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:
@@ -7,10 +7,12 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
[TestOf(typeof(AtmosAlarmThreshold))]
|
||||
public sealed class AlarmThresholdTest
|
||||
{
|
||||
private const string AlarmThresholdTestDummyId = "AlarmThresholdTestDummy";
|
||||
|
||||
[TestPrototypes]
|
||||
private const string Prototypes = @"
|
||||
private const string Prototypes = $@"
|
||||
- type: alarmThreshold
|
||||
id: AlarmThresholdTestDummy
|
||||
id: {AlarmThresholdTestDummyId}
|
||||
upperBound: !type:AlarmThresholdSetting
|
||||
threshold: 5
|
||||
lowerBound: !type:AlarmThresholdSetting
|
||||
@@ -30,7 +32,7 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
var prototypeManager = server.ResolveDependency<IPrototypeManager>();
|
||||
AtmosAlarmThreshold threshold = default!;
|
||||
|
||||
var proto = prototypeManager.Index<AtmosAlarmThresholdPrototype>("AlarmThresholdTestDummy");
|
||||
var proto = prototypeManager.Index<AtmosAlarmThresholdPrototype>(AlarmThresholdTestDummyId);
|
||||
threshold = new(proto);
|
||||
|
||||
await server.WaitAssertion(() =>
|
||||
|
||||
Reference in New Issue
Block a user