Fix content.integration tests warnings (#17817)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using NUnit.Framework;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
@@ -16,7 +14,7 @@ namespace Content.IntegrationTests.Tests
|
||||
[Test]
|
||||
public async Task Test()
|
||||
{
|
||||
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true});
|
||||
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings { NoClient = true });
|
||||
var server = pairTracker.Pair.Server;
|
||||
await server.WaitIdleAsync();
|
||||
|
||||
@@ -25,6 +23,7 @@ namespace Content.IntegrationTests.Tests
|
||||
var physicsSystem = entManager.System<SharedPhysicsSystem>();
|
||||
|
||||
EntityUid gridEnt = default;
|
||||
PhysicsComponent gridPhys = null;
|
||||
|
||||
await server.WaitAssertion(() =>
|
||||
{
|
||||
@@ -32,11 +31,17 @@ namespace Content.IntegrationTests.Tests
|
||||
var grid = mapMan.CreateGrid(mapId);
|
||||
gridEnt = grid.Owner;
|
||||
|
||||
Assert.That(entManager.HasComponent<ShuttleComponent>(gridEnt));
|
||||
Assert.That(entManager.TryGetComponent<PhysicsComponent>(gridEnt, out var physicsComponent));
|
||||
Assert.That(physicsComponent!.BodyType, Is.EqualTo(BodyType.Dynamic));
|
||||
Assert.That(entManager.GetComponent<TransformComponent>(gridEnt).LocalPosition, Is.EqualTo(Vector2.Zero));
|
||||
physicsSystem.ApplyLinearImpulse(gridEnt, Vector2.One, body: physicsComponent);
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
Assert.That(entManager.HasComponent<ShuttleComponent>(gridEnt));
|
||||
Assert.That(entManager.TryGetComponent<PhysicsComponent>(gridEnt, out gridPhys));
|
||||
});
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
Assert.That(gridPhys.BodyType, Is.EqualTo(BodyType.Dynamic));
|
||||
Assert.That(entManager.GetComponent<TransformComponent>(gridEnt).LocalPosition, Is.EqualTo(Vector2.Zero));
|
||||
});
|
||||
physicsSystem.ApplyLinearImpulse(gridEnt, Vector2.One, body: gridPhys);
|
||||
});
|
||||
|
||||
await server.WaitRunTicks(1);
|
||||
|
||||
Reference in New Issue
Block a user