Remove useless resolves from a buncha tests.

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 12:43:38 +01:00
parent 32416334c4
commit 2699540526
30 changed files with 189 additions and 184 deletions

View File

@@ -82,13 +82,13 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
device1 = entityManager.SpawnEntity("DummyNetworkDevice", MapCoordinates.Nullspace);
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out networkComponent1), Is.True);
Assert.That(entityManager.TryGetComponent(device1, out networkComponent1), Is.True);
Assert.That(networkComponent1.Open, Is.True);
Assert.That(networkComponent1.Address, Is.Not.EqualTo(string.Empty));
device2 = entityManager.SpawnEntity("DummyNetworkDevice", MapCoordinates.Nullspace);
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2, out networkComponent2), Is.True);
Assert.That(entityManager.TryGetComponent(device2, out networkComponent2), Is.True);
Assert.That(networkComponent2.Open, Is.True);
Assert.That(networkComponent2.Address, Is.Not.EqualTo(string.Empty));
@@ -145,14 +145,14 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
device1 = entityManager.SpawnEntity("DummyWirelessNetworkDevice", MapCoordinates.Nullspace);
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out networkComponent1), Is.True);
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out wirelessNetworkComponent), Is.True);
Assert.That(entityManager.TryGetComponent(device1, out networkComponent1), Is.True);
Assert.That(entityManager.TryGetComponent(device1, out wirelessNetworkComponent), Is.True);
Assert.That(networkComponent1.Open, Is.True);
Assert.That(networkComponent1.Address, Is.Not.EqualTo(string.Empty));
device2 = entityManager.SpawnEntity("DummyWirelessNetworkDevice", new MapCoordinates(new Robust.Shared.Maths.Vector2(0,50), MapId.Nullspace));
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2, out networkComponent2), Is.True);
Assert.That(entityManager.TryGetComponent(device2, out networkComponent2), Is.True);
Assert.That(networkComponent2.Open, Is.True);
Assert.That(networkComponent2.Address, Is.Not.EqualTo(string.Empty));
@@ -232,14 +232,14 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
device1 = entityManager.SpawnEntity("DummyWiredNetworkDevice", MapCoordinates.Nullspace);
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out networkComponent1), Is.True);
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out wiredNetworkComponent), Is.True);
Assert.That(entityManager.TryGetComponent(device1, out networkComponent1), Is.True);
Assert.That(entityManager.TryGetComponent(device1, out wiredNetworkComponent), Is.True);
Assert.That(networkComponent1.Open, Is.True);
Assert.That(networkComponent1.Address, Is.Not.EqualTo(string.Empty));
device2 = entityManager.SpawnEntity("DummyWiredNetworkDevice", new MapCoordinates(new Robust.Shared.Maths.Vector2(0, 2), MapId.Nullspace));
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2, out networkComponent2), Is.True);
Assert.That(entityManager.TryGetComponent(device2, out networkComponent2), Is.True);
Assert.That(networkComponent2.Open, Is.True);
Assert.That(networkComponent2.Address, Is.Not.EqualTo(string.Empty));