From 5553fc0b128860b6691344e81bacb532163736e8 Mon Sep 17 00:00:00 2001 From: Truoizys Date: Sun, 14 Jul 2024 11:29:50 +0100 Subject: [PATCH] horror show init test --- .../Tests/PostMapInitTest.cs | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/Content.IntegrationTests/Tests/PostMapInitTest.cs b/Content.IntegrationTests/Tests/PostMapInitTest.cs index cd14bfdc90..05eed976b0 100644 --- a/Content.IntegrationTests/Tests/PostMapInitTest.cs +++ b/Content.IntegrationTests/Tests/PostMapInitTest.cs @@ -26,8 +26,12 @@ public sealed class PostMapInitTest { private const bool SkipTestMaps = true; private const string TestMapsPath = "/Maps/Test/"; + await using var pair = await PoolManager.GetServerClient(); + var server = pair.Server; + var protoMan = server.ResolveDependency(); + var gameMaps = protoMan.EnumeratePrototypes().Where(x => !pair.IsTestPrototype(x)).Select(x => x.ID).ToHashSet(); - private static readonly string[] NoSpawnMaps = + private static readonly string[] NoSpawnMaps = { "CentComm", "Dart", @@ -154,7 +158,7 @@ public async Task NoSavedPostMapInitTest() await pair.CleanReturnAsync(); } - [Test, TestCaseSource(nameof(GameMaps))] + [Test, TestCaseSource(nameof(gameMaps))] public async Task GameMapsLoadableTest(string mapProto) { await using var pair = await PoolManager.GetServerClient(new PoolSettings @@ -298,25 +302,6 @@ private static int GetCountLateSpawn(List gridUids, IEntityManager return resultCount; } - [Test] - public async Task AllMapsTested() - { - await using var pair = await PoolManager.GetServerClient(); - var server = pair.Server; - var protoMan = server.ResolveDependency(); - - var gameMaps = protoMan.EnumeratePrototypes() - .Where(x => !pair.IsTestPrototype(x)) - .Select(x => x.ID) - .ToHashSet(); - - Assert.That(gameMaps.Remove(PoolManager.TestMap)); - - Assert.That(gameMaps, Is.EquivalentTo(GameMaps.ToHashSet()), "Game map prototype missing from test cases."); - - await pair.CleanReturnAsync(); - } - [Test] public async Task NonGameMapsLoadableTest() {