Assert.NotNull(newBlock.Id,"Newly placed block is missing Id. This should be populated when the block is placed.","Newly placed block Id is not null, block successfully placed.");
if(!Assert.CloseTo(newBlock.Position,(Unity.Mathematics.float3.zero+2),$"Newly placed block at {newBlock.Position} is expected at {Unity.Mathematics.float3.zero + 2}.","Newly placed block position matches."))return;
Assert.Errorless(()=>{textBlock=Block.PlaceNew<TextBlock>(BlockIDs.TextBlock,Unity.Mathematics.float3.zero+1);},"Block.PlaceNew<TextBlock>() raised an exception: ","Block.PlaceNew<TextBlock>() completed without issue.");
if(!Assert.NotNull(textBlock,"Block.PlaceNew<TextBlock>() returned null, possibly because it failed silently.","Specialized TextBlock is not null."))return;
if(!Assert.NotNull(textBlock.Text,"TextBlock.Text is null, possibly because it failed silently.","TextBlock.Text is not null."))return;
if(!Assert.NotNull(textBlock.TextBlockId,"TextBlock.TextBlockId is null, possibly because it failed silently.","TextBlock.TextBlockId is not null."))return;
Motorb=null;// Note: the assignment operation is a lambda, which slightly confuses the compiler
Assert.Errorless(()=>{b=newBlock.Specialise<Motor>();},"Block.Specialize<Motor>() raised an exception: ","Block.Specialize<Motor>() completed without issue.");
if(!Assert.NotNull(b,"Block.Specialize<Motor>() returned null, possibly because it failed silently.","Specialized Motor is not null."))return;
if(!Assert.CloseTo(b.Torque,75f,$"Motor.Torque {b.Torque} does not equal default value, possibly because it failed silently.","Motor.Torque close enough to default."))return;
if(!Assert.CloseTo(b.TopSpeed,30f,$"Motor.TopSpeed {b.TopSpeed} does not equal default value, possibly because it failed silently.","Motor.Torque is close enough to default."))return;
if(!Assert.Equal(b.Reverse,false,$"Motor.Reverse {b.Reverse} does not equal default value, possibly because it failed silently.","Motor.Reverse is default."))return;
Pistonb=null;// Note: the assignment operation is a lambda, which slightly confuses the compiler
Assert.Errorless(()=>{b=newBlock.Specialise<Piston>();},"Block.Specialize<Piston>() raised an exception: ","Block.Specialize<Piston>() completed without issue.");
if(!Assert.NotNull(b,"Block.Specialize<Piston>() returned null, possibly because it failed silently.","Specialized Piston is not null."))return;
if(!Assert.CloseTo(b.MaximumExtension,1.01f,$"Piston.MaximumExtension {b.MaximumExtension} does not equal default value, possibly because it failed silently.","Piston.MaximumExtension is close enough to default."))return;
if(!Assert.CloseTo(b.MaximumForce,750f,$"Piston.MaximumForce {b.MaximumForce} does not equal default value, possibly because it failed silently.","Piston.MaximumForce is close enough to default."))return;
Servob=null;// Note: the assignment operation is a lambda, which slightly confuses the compiler
Assert.Errorless(()=>{b=newBlock.Specialise<Servo>();},"Block.Specialize<Servo>() raised an exception: ","Block.Specialize<Servo>() completed without issue.");
if(!Assert.NotNull(b,"Block.Specialize<Servo>() returned null, possibly because it failed silently.","Specialized Servo is not null."))return;
if(!Assert.CloseTo(b.MaximumAngle,180f,$"Servo.MaximumAngle {b.MaximumAngle} does not equal default value, possibly because it failed silently.","Servo.MaximumAngle is close enough to default."))return;
if(!Assert.CloseTo(b.MinimumAngle,-180f,$"Servo.MinimumAngle {b.MinimumAngle} does not equal default value, possibly because it failed silently.","Servo.MinimumAngle is close enough to default."))return;
if(!Assert.CloseTo(b.MaximumForce,750f,$"Servo.MaximumForce {b.MaximumForce} does not equal default value, possibly because it failed silently.","Servo.MaximumForce is close enough to default."))return;
MusicBlockb=null;// Note: the assignment operation is a lambda, which slightly confuses the compiler
Assert.Errorless(()=>{b=newBlock.Specialise<MusicBlock>();},"Block.Specialize<MusicBlock>() raised an exception: ","Block.Specialize<MusicBlock>() completed without issue.");
if(!Assert.NotNull(b,"Block.Specialize<MusicBlock>() returned null, possibly because it failed silently.","Specialized MusicBlock is not null."))return;
if(!Assert.CloseTo(b.Volume,100f,$"MusicBlock.Volume {b.Volume} does not equal default value, possibly because it failed silently.","MusicBlock.Volume is close enough to default."))return;
if(!Assert.Equal(b.TrackIndex,0,$"MusicBlock.TrackIndex {b.TrackIndex} does not equal default value, possibly because it failed silently.","MusicBlock.TrackIndex is equal to default."))return;
if(!Assert.NotNull(b,"Block.Specialize<MusicBlock>() returned null, possibly because it failed silently.","Specialized MusicBlock is not null."))return;
if(!Assert.Equal(b.IsPlaying,true,$"MusicBlock.IsPlaying {b.IsPlaying} does not equal true, possibly because it failed silently.","MusicBlock.IsPlaying is set properly."))return;
if(!Assert.Equal(b.ChannelType,ChannelType.None,$"MusicBlock.ChannelType {b.ChannelType} does not equal default value, possibly because it failed silently.","MusicBlock.ChannelType is equal to default."))return;
if(!Assert.Equal(b.Track.ToString(),newGuid("3237ff8f-f5f2-4f84-8144-496ca280f8c0").ToString(),$"MusicBlock.Track {b.Track} does not equal default value, possibly because it failed silently.","MusicBlock.Track is equal to default."))return;
LogicGateb=null;// Note: the assignment operation is a lambda, which slightly confuses the compiler
Assert.Errorless(()=>{b=newBlock.Specialise<LogicGate>();},"Block.Specialize<LogicGate>() raised an exception: ","Block.Specialize<LogicGate>() completed without issue.");
if(!Assert.NotNull(b,"Block.Specialize<LogicGate>() returned null, possibly because it failed silently.","Specialized LogicGate is not null."))return;
if(!Assert.Equal(b.InputCount,1u,$"LogicGate.InputCount {b.InputCount} does not equal default value, possibly because it failed silently.","LogicGate.InputCount is default."))return;
if(!Assert.Equal(b.OutputCount,1u,$"LogicGate.OutputCount {b.OutputCount} does not equal default value, possibly because it failed silently.","LogicGate.OutputCount is default."))return;
if(!Assert.NotNull(b,"Block.Specialize<LogicGate>() returned null, possibly because it failed silently.","Specialized LogicGate is not null."))return;
//if (!Assert.Equal(b.PortName(0, true), "Input", $"LogicGate.PortName(0, input:true) {b.PortName(0, true)} does not equal default value, possibly because it failed silently.", "LogicGate.PortName(0, input:true) is close enough to default.")) return;
if(!Assert.NotNull(newWire,"SignalingBlock.Connect(...) returned null, possible because it failed silently.","SignalingBlock.Connect(...) returned a non-null value."))return;