Validate ProtoIds in tests (#38745)

* Convert string literals to protoids in Content.Tests

* Convert string literals to protoids or consts in Content.IntegrationTests

* Fix linter failures
Tricksy static using misled me
This commit is contained in:
Tayrtahn
2025-07-04 16:48:55 -04:00
committed by GitHub
parent c3267c6db0
commit 3a278bca8b
17 changed files with 129 additions and 83 deletions

View File

@@ -77,6 +77,8 @@ namespace Content.IntegrationTests.Tests
"Exo",
};
private static readonly ProtoId<EntityCategoryPrototype> DoNotMapCategory = "DoNotMap";
/// <summary>
/// Asserts that specific files have been saved as grids and not maps.
/// </summary>
@@ -254,7 +256,7 @@ namespace Content.IntegrationTests.Tests
return;
var yamlEntities = node["entities"];
if (!protoManager.TryIndex<EntityCategoryPrototype>("DoNotMap", out var dnmCategory))
if (!protoManager.TryIndex(DoNotMapCategory, out var dnmCategory))
return;
Assert.Multiple(() =>