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:
@@ -20,6 +20,8 @@ namespace Content.IntegrationTests.Tests
|
||||
[TestOf(typeof(VendingMachineSystem))]
|
||||
public sealed class VendingMachineRestockTest : EntitySystem
|
||||
{
|
||||
private static readonly ProtoId<DamageTypePrototype> TestDamageType = "Blunt";
|
||||
|
||||
[TestPrototypes]
|
||||
private const string Prototypes = @"
|
||||
- type: entity
|
||||
@@ -293,7 +295,7 @@ namespace Content.IntegrationTests.Tests
|
||||
"Did not start with zero ramen.");
|
||||
|
||||
restock = entityManager.SpawnEntity("TestRestockExplode", coordinates);
|
||||
var damageSpec = new DamageSpecifier(prototypeManager.Index<DamageTypePrototype>("Blunt"), 100);
|
||||
var damageSpec = new DamageSpecifier(prototypeManager.Index(TestDamageType), 100);
|
||||
var damageResult = damageableSystem.TryChangeDamage(restock, damageSpec);
|
||||
|
||||
#pragma warning disable NUnit2045
|
||||
|
||||
Reference in New Issue
Block a user