From e635a6314f8a69bce7f343cf5e4018c86f655b0a Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:04:53 +0700 Subject: [PATCH 01/10] build(test): update MSTest dependencies --- .../Arvrel.ProcessBus.Tests/Arvrel.ProcessBus.Tests.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 - - - + + + From 2e74dc06744c11be910b21be69a6588ec2a12ef0 Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:05:20 +0700 Subject: [PATCH 02/10] build(test): update MSTest dependencies --- .../Arvrel.Protection.Tests/Arvrel.Protection.Tests.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 - - - + + + From 8b5a9a99e9826ca6442c8ee7856a2a5f54c76fa6 Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:05:48 +0700 Subject: [PATCH 03/10] test: adopt current MSTest attributes --- tests/Arvrel.Protection.Tests/AlgorithmPolicyValidatorTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")] From 134333ebc48e79dce4f34eff01877c4ab86d23bd Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:06:03 +0700 Subject: [PATCH 04/10] test: adopt current MSTest attributes --- tests/Arvrel.Protection.Tests/AlgorithmSourceCatalogTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")] From 7adb006f3c8fc0bca4ca1786d801423122a37600 Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:09:25 +0700 Subject: [PATCH 05/10] test: use exact exception assertions --- .../ProtectionSettingsIdentityTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } } From f0cf0b1e653b888ab2100919c457abce9b9c67ab Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:09:53 +0700 Subject: [PATCH 06/10] test: use exact exception assertions --- .../VirtualInjectionAngleOperationsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } } From c636a3807a409521120f6862bb0bd78af91b6215 Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:10:09 +0700 Subject: [PATCH 07/10] test: use exact exception assertions --- tests/Arvrel.ProcessBus.Tests/MeasurementContextTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } } From 5534c6159142fe701dd66ff66ee12573c0ccf84c Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:10:35 +0700 Subject: [PATCH 08/10] test: use exact exception assertions --- tests/Arvrel.ProcessBus.Tests/PcapPacketReaderTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From 6da057eb96912a2c21179317c8e1a5683e8a366f Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:11:21 +0700 Subject: [PATCH 09/10] test: use exact exception assertions --- tests/Arvrel.Protection.Tests/VirtualInjectionRuntimeTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +} From 7a404313f9618ae7246b8e3f1186f3dd0989ca52 Mon Sep 17 00:00:00 2001 From: masarray Date: Thu, 6 Aug 2026 14:12:03 +0700 Subject: [PATCH 10/10] test: use exact exception assertions --- tests/Arvrel.Protection.Tests/VirtualInjectionTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); }