Add a test that puts all components on an entity and checks for no exceptions (#1815)
* Add test that puts all components on an entity and checks for no exceptions Also fix all the exceptions that happened because of this * Add comments to the test * Fix nullable errors * Fix more nullable errors * More nullable error fixes * Unignore basic actor component * Fix more nullable errors * NULLABLE ERROR * Add string interpolation * Merge if checks * Remove redundant pragma warning disable 649 * Address reviews * Remove null wrappers around TryGetComponent * Merge conflict fixes * APC battery component error fix * Fix power test * Fix atmos mapgrid usages
This commit is contained in:
@@ -49,7 +49,7 @@ namespace Content.IntegrationTests.Tests
|
||||
});
|
||||
|
||||
server.RunTicks(1); //let run a tick for PowerNet to process power
|
||||
|
||||
|
||||
server.Assert(() =>
|
||||
{
|
||||
Assert.That(consumer1.DrawRate, Is.EqualTo(consumer1.ReceivedPower)); //first should be fully powered
|
||||
@@ -127,6 +127,7 @@ namespace Content.IntegrationTests.Tests
|
||||
Assert.That(apcEnt.TryGetComponent<ApcComponent>(out var apc));
|
||||
Assert.That(apcExtensionEnt.TryGetComponent<PowerProviderComponent>(out var provider));
|
||||
Assert.That(powerReceiverEnt.TryGetComponent(out receiver));
|
||||
Assert.NotNull(apc.Battery);
|
||||
|
||||
provider.PowerTransferRange = 5; //arbitrary range to reach receiver
|
||||
receiver.PowerReceptionRange = 5; //arbitrary range to reach provider
|
||||
|
||||
Reference in New Issue
Block a user