Skip to content

Commit a341119

Browse files
Update IgnoreIfServiceEnvironmentVariableSetAttribute.cs
1 parent c938e7f commit a341119

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

com.unity.netcode.gameobjects/Tests/Runtime/TestHelpers/NUnitExtensions/IgnoreIfServiceEnvironmentVariableSetAttribute.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55

66
namespace Unity.Netcode.TestHelpers.Runtime
77
{
8-
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
9-
public class IgnoreIfServiceEnvironmentVariableSetAttribute : NUnitAttribute, IApplyToTest
10-
{
11-
public void ApplyToTest(Test test)
12-
{
13-
// NotRunnable is the more weighty status, always respect it first
14-
if (test.RunState == RunState.NotRunnable)
15-
{
16-
return;
17-
}
8+
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
9+
public class IgnoreIfServiceEnvironmentVariableSetAttribute : NUnitAttribute, IApplyToTest
10+
{
11+
public void ApplyToTest(Test test)
12+
{
13+
// NotRunnable is the more weighty status, always respect it first
14+
if (test.RunState == RunState.NotRunnable)
15+
{
16+
return;
17+
}
1818

19-
if (bool.TryParse(NetcodeIntegrationTestHelpers.GetCMBServiceEnvironentVariable(), out var isTrue) && isTrue)
20-
{
21-
test.RunState = RunState.Ignored;
22-
test.Properties.Set("_SKIPREASON", NetcodeIntegrationTestHelpers.IgnoredForCmbServiceReason);
23-
}
24-
}
25-
}
19+
if (bool.TryParse(NetcodeIntegrationTestHelpers.GetCMBServiceEnvironentVariable(), out var isTrue) && isTrue)
20+
{
21+
test.RunState = RunState.Ignored;
22+
test.Properties.Set("_SKIPREASON", NetcodeIntegrationTestHelpers.IgnoredForCmbServiceReason);
23+
}
24+
}
25+
}
2626
}

0 commit comments

Comments
 (0)