Fix content.integration tests warnings (#17817)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
TemporalOroboros
2023-07-05 21:54:25 -07:00
committed by GitHub
parent 20c1754abd
commit ba91023a85
121 changed files with 3658 additions and 1961 deletions

View File

@@ -1,11 +1,6 @@
using System.Threading.Tasks;
using Content.Server.Gravity;
using Content.Shared.Alert;
using Content.Shared.Coordinates;
using NUnit.Framework;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
namespace Content.IntegrationTests.Tests.Gravity
{
@@ -37,7 +32,11 @@ namespace Content.IntegrationTests.Tests.Gravity
[Test]
public async Task WeightlessStatusTest()
{
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true, ExtraPrototypes = Prototypes});
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings
{
NoClient = true,
ExtraPrototypes = Prototypes
});
var server = pairTracker.Pair.Server;
var entityManager = server.ResolveDependency<IEntityManager>();
@@ -51,7 +50,7 @@ namespace Content.IntegrationTests.Tests.Gravity
{
human = entityManager.SpawnEntity("HumanDummy", testMap.GridCoords);
Assert.True(entityManager.TryGetComponent(human, out AlertsComponent alerts));
Assert.That(entityManager.TryGetComponent(human, out AlertsComponent alerts));
});
// Let WeightlessSystem and GravitySystem tick
@@ -60,7 +59,7 @@ namespace Content.IntegrationTests.Tests.Gravity
await server.WaitAssertion(() =>
{
// No gravity without a gravity generator
Assert.True(alertsSystem.IsShowingAlert(human, AlertType.Weightless));
Assert.That(alertsSystem.IsShowingAlert(human, AlertType.Weightless));
generatorUid = entityManager.SpawnEntity("GravityGeneratorDummy", entityManager.GetComponent<TransformComponent>(human).Coordinates);
});
@@ -70,7 +69,7 @@ namespace Content.IntegrationTests.Tests.Gravity
await server.WaitAssertion(() =>
{
Assert.False(alertsSystem.IsShowingAlert(human, AlertType.Weightless));
Assert.That(alertsSystem.IsShowingAlert(human, AlertType.Weightless), Is.False);
// This should kill gravity
entityManager.DeleteEntity(generatorUid);
@@ -80,7 +79,7 @@ namespace Content.IntegrationTests.Tests.Gravity
await server.WaitAssertion(() =>
{
Assert.True(alertsSystem.IsShowingAlert(human, AlertType.Weightless));
Assert.That(alertsSystem.IsShowingAlert(human, AlertType.Weightless));
});
await PoolManager.RunTicksSync(pairTracker.Pair, 10);