Skip to content

Commit

Permalink
Clean up test code
Browse files Browse the repository at this point in the history
  • Loading branch information
DebugOk committed Dec 31, 2023
1 parent 75d4e5d commit 70cbb46
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Content.IntegrationTests/Tests/DeltaV/CrimeassistTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,13 @@ public async Task CrimeAssistValid()
var server = pair.Server;
await server.WaitIdleAsync();

var mapManager = server.ResolveDependency<IMapManager>();
var prototypeManager = server.ResolveDependency<IPrototypeManager>();

var testMap = await pair.CreateTestMap();

// Get all CrimeAssistPage
var allProtos = prototypeManager.EnumeratePrototypes<CrimeAssistPage>().ToArray();

await server.WaitAssertion(() =>
{
foreach (var proto in allProtos)
{
// Assert that ID is unique, and not present a second time in allProtos
Assert.That(allProtos.Count(p => p.ID == proto.ID), Is.EqualTo(1),
$"CrimeAssistPage {proto.ID} is not unique!");

if (proto.LocKey != null)
{
Assert.That(Loc.TryGetString(proto.LocKey, out var _),
Expand Down Expand Up @@ -81,12 +72,6 @@ await server.WaitAssertion(() =>
$"CrimeAssistPage {proto.ID} has invalid OnNo {proto.OnNo}!");
}
}

// Because Server/Client pairs can be re-used between Tests, we
// need to clean up anything that might affect other tests,
// otherwise this pair cannot be considered clean, and the
// CleanReturnAsync call would need to be removed.
mapManager.DeleteMap(testMap.MapId);
});

await pair.CleanReturnAsync();
Expand Down

0 comments on commit 70cbb46

Please sign in to comment.