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:
@@ -12,6 +12,8 @@ namespace Content.Tests.Shared;
|
||||
[TestOf(typeof(LocalizedDatasetPrototype))]
|
||||
public sealed class LocalizedDatasetPrototypeTest : ContentUnitTest
|
||||
{
|
||||
private const string TestDatasetId = "Test";
|
||||
|
||||
private IPrototypeManager _prototypeManager;
|
||||
|
||||
[OneTimeSetUp]
|
||||
@@ -24,9 +26,9 @@ public sealed class LocalizedDatasetPrototypeTest : ContentUnitTest
|
||||
_prototypeManager.ResolveResults();
|
||||
}
|
||||
|
||||
private const string TestPrototypes = @"
|
||||
private const string TestPrototypes = $@"
|
||||
- type: localizedDataset
|
||||
id: Test
|
||||
id: {TestDatasetId}
|
||||
values:
|
||||
prefix: test-dataset-
|
||||
count: 4
|
||||
@@ -35,7 +37,7 @@ public sealed class LocalizedDatasetPrototypeTest : ContentUnitTest
|
||||
[Test]
|
||||
public void LocalizedDatasetTest()
|
||||
{
|
||||
var testPrototype = _prototypeManager.Index<LocalizedDatasetPrototype>("Test");
|
||||
var testPrototype = _prototypeManager.Index<LocalizedDatasetPrototype>(TestDatasetId);
|
||||
var values = new ValueList<string>();
|
||||
foreach (var value in testPrototype.Values)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user