Fix content.integration tests warnings (#17817)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Fluids.Components;
|
||||
using Content.Server.Fluids.EntitySystems;
|
||||
using Content.Server.Spreader;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Fluids.Components;
|
||||
using NUnit.Framework;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
@@ -75,8 +70,10 @@ public sealed class FluidSpill
|
||||
var grid = mapManager.GetGrid(gridId);
|
||||
var solution = new Solution("Blood", FixedPoint2.New(100));
|
||||
var tileRef = grid.GetTileRef(puddleOrigin);
|
||||
#pragma warning disable NUnit2045 // Interdependent tests
|
||||
Assert.That(puddleSystem.TrySpillAt(tileRef, solution, out _), Is.True);
|
||||
Assert.That(GetPuddle(entityManager, grid, puddleOrigin), Is.Not.Null);
|
||||
#pragma warning restore NUnit2045
|
||||
});
|
||||
|
||||
var sTimeToWait = (int) Math.Ceiling(2f * gameTiming.TickRate);
|
||||
@@ -87,8 +84,11 @@ public sealed class FluidSpill
|
||||
var grid = mapManager.GetGrid(gridId);
|
||||
var puddle = GetPuddle(entityManager, grid, puddleOrigin);
|
||||
|
||||
|
||||
#pragma warning disable NUnit2045 // Interdependent tests
|
||||
Assert.That(puddle, Is.Not.Null);
|
||||
Assert.That(puddleSystem.CurrentVolume(puddle!.Owner, puddle), Is.EqualTo(FixedPoint2.New(100)));
|
||||
#pragma warning restore NUnit2045
|
||||
|
||||
for (var x = 0; x < 3; x++)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Fluids.Components;
|
||||
using Content.Server.Fluids.EntitySystems;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Coordinates;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Fluids.Components;
|
||||
using NUnit.Framework;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.IntegrationTests.Tests.Fluids
|
||||
{
|
||||
@@ -21,7 +16,7 @@ namespace Content.IntegrationTests.Tests.Fluids
|
||||
[Test]
|
||||
public async Task TilePuddleTest()
|
||||
{
|
||||
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;
|
||||
|
||||
var testMap = await PoolManager.CreateTestMap(pairTracker);
|
||||
@@ -36,9 +31,8 @@ namespace Content.IntegrationTests.Tests.Fluids
|
||||
var gridUid = tile.GridUid;
|
||||
var (x, y) = tile.GridIndices;
|
||||
var coordinates = new EntityCoordinates(gridUid, x, y);
|
||||
var puddle = spillSystem.TrySpillAt(coordinates, solution, out _);
|
||||
|
||||
Assert.True(puddle);
|
||||
Assert.That(spillSystem.TrySpillAt(coordinates, solution, out _), Is.True);
|
||||
});
|
||||
await PoolManager.RunTicksSync(pairTracker.Pair, 5);
|
||||
|
||||
@@ -48,7 +42,7 @@ namespace Content.IntegrationTests.Tests.Fluids
|
||||
[Test]
|
||||
public async Task SpaceNoPuddleTest()
|
||||
{
|
||||
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;
|
||||
|
||||
var testMap = await PoolManager.CreateTestMap(pairTracker);
|
||||
@@ -75,8 +69,8 @@ namespace Content.IntegrationTests.Tests.Fluids
|
||||
{
|
||||
var coordinates = grid.ToCoordinates();
|
||||
var solution = new Solution("Water", FixedPoint2.New(20));
|
||||
var puddle = spillSystem.TrySpillAt(coordinates, solution, out _);
|
||||
Assert.False(puddle);
|
||||
|
||||
Assert.That(spillSystem.TrySpillAt(coordinates, solution, out _), Is.False);
|
||||
});
|
||||
|
||||
await pairTracker.CleanReturnAsync();
|
||||
|
||||
Reference in New Issue
Block a user