Make PostMapInitTest ignore test maps instead of those in an array (#2066)
This commit is contained in:
@@ -11,10 +11,8 @@ namespace Content.IntegrationTests.Tests
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class PostMapInitTest : ContentIntegrationTest
|
public class PostMapInitTest : ContentIntegrationTest
|
||||||
{
|
{
|
||||||
public readonly string[] SkippedMaps =
|
public const bool SkipTestMaps = true;
|
||||||
{
|
public const string TestMapsPath = "/Maps/Test/";
|
||||||
"/Maps/Pathfinding/simple.yml"
|
|
||||||
};
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task NoSavedPostMapInitTest()
|
public async Task NoSavedPostMapInitTest()
|
||||||
@@ -34,7 +32,8 @@ namespace Content.IntegrationTests.Tests
|
|||||||
{
|
{
|
||||||
var rootedPath = map.ToRootedPath();
|
var rootedPath = map.ToRootedPath();
|
||||||
|
|
||||||
if (SkippedMaps.Contains(rootedPath.ToString()))
|
// ReSharper disable once RedundantLogicalConditionalExpressionOperand
|
||||||
|
if (SkipTestMaps && rootedPath.ToString().StartsWith(TestMapsPath))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -53,7 +52,7 @@ namespace Content.IntegrationTests.Tests
|
|||||||
var meta = root["meta"];
|
var meta = root["meta"];
|
||||||
var postMapInit = meta["postmapinit"].AsBool();
|
var postMapInit = meta["postmapinit"].AsBool();
|
||||||
|
|
||||||
Assert.False(postMapInit);
|
Assert.False(postMapInit, $"Map {map.Filename} was saved postmapinit");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user