diff --git a/tests/Arvrel.ProcessBus.Tests/Arvrel.ProcessBus.Tests.csproj b/tests/Arvrel.ProcessBus.Tests/Arvrel.ProcessBus.Tests.csproj
index cef369c2..c6aa6bbe 100644
--- a/tests/Arvrel.ProcessBus.Tests/Arvrel.ProcessBus.Tests.csproj
+++ b/tests/Arvrel.ProcessBus.Tests/Arvrel.ProcessBus.Tests.csproj
@@ -6,9 +6,9 @@
true
-
-
-
+
+
+
diff --git a/tests/Arvrel.ProcessBus.Tests/MeasurementContextTests.cs b/tests/Arvrel.ProcessBus.Tests/MeasurementContextTests.cs
index 37b32464..9c4b1384 100644
--- a/tests/Arvrel.ProcessBus.Tests/MeasurementContextTests.cs
+++ b/tests/Arvrel.ProcessBus.Tests/MeasurementContextTests.cs
@@ -26,13 +26,13 @@ public void CalculatesPrimaryCurrentAndVoltageRatios()
public void RejectsInvalidFrequency()
{
var context = new SmvMeasurementContext { NominalFrequencyHz = 70 };
- Assert.ThrowsException(context.Validate);
+ Assert.ThrowsExactly(context.Validate);
}
[TestMethod]
public void RejectsInvalidVtSecondary()
{
var context = new SmvMeasurementContext { VtSecondaryV = 0 };
- Assert.ThrowsException(context.Validate);
+ Assert.ThrowsExactly(context.Validate);
}
}
diff --git a/tests/Arvrel.ProcessBus.Tests/PcapPacketReaderTests.cs b/tests/Arvrel.ProcessBus.Tests/PcapPacketReaderTests.cs
index 7dfb617b..45a26806 100644
--- a/tests/Arvrel.ProcessBus.Tests/PcapPacketReaderTests.cs
+++ b/tests/Arvrel.ProcessBus.Tests/PcapPacketReaderTests.cs
@@ -84,7 +84,7 @@ public void RejectsNonEthernetClassicPcap()
WriteUInt32(stream, 101);
}
- Assert.ThrowsException(() => PcapPacketReader.Read(path).ToArray());
+ Assert.ThrowsExactly(() => PcapPacketReader.Read(path).ToArray());
}
finally
{
diff --git a/tests/Arvrel.Protection.Tests/AlgorithmPolicyValidatorTests.cs b/tests/Arvrel.Protection.Tests/AlgorithmPolicyValidatorTests.cs
index 79e2a33c..7f5e698f 100644
--- a/tests/Arvrel.Protection.Tests/AlgorithmPolicyValidatorTests.cs
+++ b/tests/Arvrel.Protection.Tests/AlgorithmPolicyValidatorTests.cs
@@ -21,7 +21,7 @@ public void SafeTemplate_Passes()
Assert.IsTrue(result.IsValid, string.Join("; ", result.Errors));
}
- [DataTestMethod]
+ [TestMethod]
[DataRow("50P-1")]
[DataRow("51P")]
[DataRow("50N")]
diff --git a/tests/Arvrel.Protection.Tests/AlgorithmSourceCatalogTests.cs b/tests/Arvrel.Protection.Tests/AlgorithmSourceCatalogTests.cs
index d4baf565..8f52828c 100644
--- a/tests/Arvrel.Protection.Tests/AlgorithmSourceCatalogTests.cs
+++ b/tests/Arvrel.Protection.Tests/AlgorithmSourceCatalogTests.cs
@@ -7,7 +7,7 @@ namespace Arvrel.Protection.Tests;
[TestClass]
public sealed class AlgorithmSourceCatalogTests
{
- [DataTestMethod]
+ [TestMethod]
[DataRow("67P", "phasor V1", "DirectionalPhase67CharacteristicAngleDeg")]
[DataRow("67N", "phasor polarizingVoltage = 3V0", "DirectionalEarth67NCharacteristicAngleDeg")]
[DataRow("27", "element \"27\"", "Undervoltage27PickupV")]
diff --git a/tests/Arvrel.Protection.Tests/Arvrel.Protection.Tests.csproj b/tests/Arvrel.Protection.Tests/Arvrel.Protection.Tests.csproj
index c6a05429..7a9447e2 100644
--- a/tests/Arvrel.Protection.Tests/Arvrel.Protection.Tests.csproj
+++ b/tests/Arvrel.Protection.Tests/Arvrel.Protection.Tests.csproj
@@ -5,9 +5,9 @@
true
-
-
-
+
+
+
diff --git a/tests/Arvrel.Protection.Tests/ProtectionSettingsIdentityTests.cs b/tests/Arvrel.Protection.Tests/ProtectionSettingsIdentityTests.cs
index d1eea03c..83543cb7 100644
--- a/tests/Arvrel.Protection.Tests/ProtectionSettingsIdentityTests.cs
+++ b/tests/Arvrel.Protection.Tests/ProtectionSettingsIdentityTests.cs
@@ -63,8 +63,8 @@ public void Validate_RejectsUndefinedLegacyCurveAndResetEnums()
EarthTimeResetMode = (ProtectionResetMode)999
};
- Assert.ThrowsException(invalidCurve.Validate);
- Assert.ThrowsException(invalidReset.Validate);
+ Assert.ThrowsExactly(invalidCurve.Validate);
+ Assert.ThrowsExactly(invalidReset.Validate);
}
[TestMethod]
@@ -85,7 +85,7 @@ public void Validate_RejectsUndefinedFeederEnums()
}
};
- Assert.ThrowsException(invalidMode.Validate);
- Assert.ThrowsException(invalidDirection.Validate);
+ Assert.ThrowsExactly(invalidMode.Validate);
+ Assert.ThrowsExactly(invalidDirection.Validate);
}
}
diff --git a/tests/Arvrel.Protection.Tests/VirtualInjectionAngleOperationsTests.cs b/tests/Arvrel.Protection.Tests/VirtualInjectionAngleOperationsTests.cs
index 5be88d00..d97a58f5 100644
--- a/tests/Arvrel.Protection.Tests/VirtualInjectionAngleOperationsTests.cs
+++ b/tests/Arvrel.Protection.Tests/VirtualInjectionAngleOperationsTests.cs
@@ -61,7 +61,7 @@ public void ReverseRotation_SwapsPhaseBAndPhaseCWithoutMovingPhaseA()
public void ThreePhaseOperations_RejectNeutralSignals()
{
Assert.IsFalse(VirtualInjectionAngleOperations.IsThreePhaseSignal(VirtualInjectionSignal.NeutralVoltage));
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
VirtualInjectionAngleOperations.BalancedAngles(VirtualInjectionSignal.NeutralVoltage, 0));
}
}
diff --git a/tests/Arvrel.Protection.Tests/VirtualInjectionRuntimeTests.cs b/tests/Arvrel.Protection.Tests/VirtualInjectionRuntimeTests.cs
index 633eea28..21d90634 100644
--- a/tests/Arvrel.Protection.Tests/VirtualInjectionRuntimeTests.cs
+++ b/tests/Arvrel.Protection.Tests/VirtualInjectionRuntimeTests.cs
@@ -35,7 +35,7 @@ public void InvalidProfile_DoesNotReplaceLastValidInjection()
var originalFingerprint = runtime.InjectionFingerprint;
var invalid = VirtualInjectionPresets.Create("A-G fault") with { FrequencyHz = 100 };
- Assert.ThrowsException(() => runtime.Apply(invalid));
+ Assert.ThrowsExactly(() => runtime.Apply(invalid));
Assert.AreEqual(originalFingerprint, runtime.InjectionFingerprint);
Assert.AreEqual("Normal balanced", runtime.ActiveProfile.Name);
@@ -212,4 +212,4 @@ public void ProtectionTripsOnlyWhenStartedCurrentMeetsPickupAndDelay()
Assert.IsFalse(zero.Phase50.Pickup);
Assert.IsTrue(zero.TripLatched);
}
-}
\ No newline at end of file
+}
diff --git a/tests/Arvrel.Protection.Tests/VirtualInjectionTests.cs b/tests/Arvrel.Protection.Tests/VirtualInjectionTests.cs
index 0a3371b8..d8640826 100644
--- a/tests/Arvrel.Protection.Tests/VirtualInjectionTests.cs
+++ b/tests/Arvrel.Protection.Tests/VirtualInjectionTests.cs
@@ -94,7 +94,7 @@ public void InvalidFrequency_IsRejectedBeforeGeneration()
{
var profile = VirtualInjectionPresets.Create("Normal balanced") with { FrequencyHz = 75 };
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
VirtualInjectionGenerator.Generate(profile, DateTimeOffset.UtcNow, SmvTrustState.Healthy));
}