Cleanup ChameleonJobLoadoutTest (#38229)
Cleanup ChameleonJobLoadoutTest
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
using Content.Client.Implants;
|
|
||||||
using Content.IntegrationTests.Tests.Interaction;
|
using Content.IntegrationTests.Tests.Interaction;
|
||||||
using Content.Shared.Clothing;
|
using Content.Shared.Clothing;
|
||||||
using Content.Shared.Implants;
|
using Content.Shared.Implants;
|
||||||
@@ -11,17 +9,17 @@ using Robust.Shared.Prototypes;
|
|||||||
namespace Content.IntegrationTests.Tests.Chameleon;
|
namespace Content.IntegrationTests.Tests.Chameleon;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ensures all round <see cref="IsProbablyRoundStartJob">"round start jobs"</see> have an associated chameleon loadout.
|
/// Ensures all <see cref="IsProbablyRoundStartJob">"round start jobs"</see> have an associated chameleon loadout.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class ChameleonJobLoadoutTest : InteractionTest
|
public sealed class ChameleonJobLoadoutTest : InteractionTest
|
||||||
{
|
{
|
||||||
private readonly List<ProtoId<JobPrototype>> JobBlacklist =
|
private static readonly List<ProtoId<JobPrototype>> JobBlacklist =
|
||||||
[
|
[
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task CheckAllJobs()
|
public Task CheckAllJobs()
|
||||||
{
|
{
|
||||||
var alljobs = ProtoMan.EnumeratePrototypes<JobPrototype>();
|
var alljobs = ProtoMan.EnumeratePrototypes<JobPrototype>();
|
||||||
|
|
||||||
@@ -47,24 +45,16 @@ public sealed class ChameleonJobLoadoutTest : InteractionTest
|
|||||||
validJobs[chameleon.Job.Value] += 1;
|
validJobs[chameleon.Job.Value] += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var errorMessage = new StringBuilder();
|
Assert.Multiple(() =>
|
||||||
errorMessage.AppendLine("The following job(s) have no chameleon prototype(s):");
|
{
|
||||||
var invalid = false;
|
|
||||||
|
|
||||||
// All round start jobs have a chameleon loadout
|
|
||||||
foreach (var job in validJobs)
|
foreach (var job in validJobs)
|
||||||
{
|
{
|
||||||
if (job.Value != 0)
|
Assert.That(job.Value, Is.Not.Zero,
|
||||||
continue;
|
$"{job.Key} has no chameleonOutfit prototype.");
|
||||||
|
|
||||||
errorMessage.AppendLine(job.Key + " has no chameleonOutfit prototype.");
|
|
||||||
invalid = true;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!invalid)
|
return Task.CompletedTask;
|
||||||
return;
|
|
||||||
|
|
||||||
Assert.Fail(errorMessage.ToString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user