From 9ed9888f86e1806309d253bdac1e334207a0516f Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:15:40 +1000 Subject: [PATCH] Update DiseaseTest (#9639) Effects / cures are indices not the threshold --- Content.IntegrationTests/Tests/DiseaseTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.IntegrationTests/Tests/DiseaseTest.cs b/Content.IntegrationTests/Tests/DiseaseTest.cs index d3c637238c..adf0997dfb 100644 --- a/Content.IntegrationTests/Tests/DiseaseTest.cs +++ b/Content.IntegrationTests/Tests/DiseaseTest.cs @@ -23,13 +23,13 @@ public sealed class DiseaseTest { foreach (var proto in protoManager.EnumeratePrototypes()) { - var stages = proto.Stages; + var stagesLength = proto.Stages.Count; foreach (var effect in proto.Effects) { for (var i = 0; i < effect.Stages.Length; i++) { - Assert.That(stages.Contains(i), $"Disease {proto.ID} has an effect with an incorrect stage, {i}!"); + Assert.That(i >= 0 && i < stagesLength, $"Disease {proto.ID} has an effect with an incorrect stage, {i}!"); } } @@ -37,7 +37,7 @@ public sealed class DiseaseTest { for (var i = 0; i < cure.Stages.Length; i++) { - Assert.That(stages.Contains(i), $"Disease {proto.ID} has a cure with an incorrect stage, {i}!"); + Assert.That(i >= 0 && i < stagesLength, $"Disease {proto.ID} has a cure with an incorrect stage, {i}!"); } } }