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,6 +1,4 @@
using System.Threading.Tasks;
using Content.Shared.Atmos.Monitor;
using NUnit.Framework;
using Robust.Shared.Prototypes;
namespace Content.IntegrationTests.Tests.Atmos
@@ -25,7 +23,7 @@ namespace Content.IntegrationTests.Tests.Atmos
[Test]
public async Task TestAlarmThreshold()
{
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 prototypeManager = server.ResolveDependency<IPrototypeManager>();
@@ -39,8 +37,11 @@ namespace Content.IntegrationTests.Tests.Atmos
await server.WaitAssertion(() =>
{
// ensure upper/lower bounds are calculated
Assert.That(threshold.UpperWarningBound.Value, Is.EqualTo(5f * 0.5f));
Assert.That(threshold.LowerWarningBound.Value, Is.EqualTo(1f * 1.5f));
Assert.Multiple(() =>
{
Assert.That(threshold.UpperWarningBound.Value, Is.EqualTo(5f * 0.5f));
Assert.That(threshold.LowerWarningBound.Value, Is.EqualTo(1f * 1.5f));
});
// ensure that setting bounds to zero/
// negative numbers is an invalid set
@@ -102,7 +103,7 @@ namespace Content.IntegrationTests.Tests.Atmos
threshold.SetEnabled(AtmosMonitorLimitType.LowerWarning, true);
// Check a value that's in between each upper/lower warning/panic:
threshold.CheckThreshold(3f, out AtmosAlarmType alarmType);
threshold.CheckThreshold(3f, out var alarmType);
Assert.That(alarmType, Is.EqualTo(AtmosAlarmType.Normal));
threshold.CheckThreshold(1.5f, out alarmType);
Assert.That(alarmType, Is.EqualTo(AtmosAlarmType.Warning));