Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.11.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.11.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Arvrel.ProcessBus\Arvrel.ProcessBus.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions tests/Arvrel.ProcessBus.Tests/MeasurementContextTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ public void CalculatesPrimaryCurrentAndVoltageRatios()
public void RejectsInvalidFrequency()
{
var context = new SmvMeasurementContext { NominalFrequencyHz = 70 };
Assert.ThrowsException<ArgumentOutOfRangeException>(context.Validate);
Assert.ThrowsExactly<ArgumentOutOfRangeException>(context.Validate);
}

[TestMethod]
public void RejectsInvalidVtSecondary()
{
var context = new SmvMeasurementContext { VtSecondaryV = 0 };
Assert.ThrowsException<ArgumentOutOfRangeException>(context.Validate);
Assert.ThrowsExactly<ArgumentOutOfRangeException>(context.Validate);
}
}
2 changes: 1 addition & 1 deletion tests/Arvrel.ProcessBus.Tests/PcapPacketReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void RejectsNonEthernetClassicPcap()
WriteUInt32(stream, 101);
}

Assert.ThrowsException<InvalidDataException>(() => PcapPacketReader.Read(path).ToArray());
Assert.ThrowsExactly<InvalidDataException>(() => PcapPacketReader.Read(path).ToArray());
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.11.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.11.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Arvrel.Protection\Arvrel.Protection.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public void Validate_RejectsUndefinedLegacyCurveAndResetEnums()
EarthTimeResetMode = (ProtectionResetMode)999
};

Assert.ThrowsException<ArgumentOutOfRangeException>(invalidCurve.Validate);
Assert.ThrowsException<ArgumentOutOfRangeException>(invalidReset.Validate);
Assert.ThrowsExactly<ArgumentOutOfRangeException>(invalidCurve.Validate);
Assert.ThrowsExactly<ArgumentOutOfRangeException>(invalidReset.Validate);
}

[TestMethod]
Expand All @@ -85,7 +85,7 @@ public void Validate_RejectsUndefinedFeederEnums()
}
};

Assert.ThrowsException<ArgumentOutOfRangeException>(invalidMode.Validate);
Assert.ThrowsException<ArgumentOutOfRangeException>(invalidDirection.Validate);
Assert.ThrowsExactly<ArgumentOutOfRangeException>(invalidMode.Validate);
Assert.ThrowsExactly<ArgumentOutOfRangeException>(invalidDirection.Validate);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void ReverseRotation_SwapsPhaseBAndPhaseCWithoutMovingPhaseA()
public void ThreePhaseOperations_RejectNeutralSignals()
{
Assert.IsFalse(VirtualInjectionAngleOperations.IsThreePhaseSignal(VirtualInjectionSignal.NeutralVoltage));
Assert.ThrowsException<ArgumentOutOfRangeException>(() =>
Assert.ThrowsExactly<ArgumentOutOfRangeException>(() =>
VirtualInjectionAngleOperations.BalancedAngles(VirtualInjectionSignal.NeutralVoltage, 0));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void InvalidProfile_DoesNotReplaceLastValidInjection()
var originalFingerprint = runtime.InjectionFingerprint;
var invalid = VirtualInjectionPresets.Create("A-G fault") with { FrequencyHz = 100 };

Assert.ThrowsException<ArgumentOutOfRangeException>(() => runtime.Apply(invalid));
Assert.ThrowsExactly<ArgumentOutOfRangeException>(() => runtime.Apply(invalid));

Assert.AreEqual(originalFingerprint, runtime.InjectionFingerprint);
Assert.AreEqual("Normal balanced", runtime.ActiveProfile.Name);
Expand Down Expand Up @@ -212,4 +212,4 @@ public void ProtectionTripsOnlyWhenStartedCurrentMeetsPickupAndDelay()
Assert.IsFalse(zero.Phase50.Pickup);
Assert.IsTrue(zero.TripLatched);
}
}
}
2 changes: 1 addition & 1 deletion tests/Arvrel.Protection.Tests/VirtualInjectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void InvalidFrequency_IsRejectedBeforeGeneration()
{
var profile = VirtualInjectionPresets.Create("Normal balanced") with { FrequencyHz = 75 };

Assert.ThrowsException<ArgumentOutOfRangeException>(() =>
Assert.ThrowsExactly<ArgumentOutOfRangeException>(() =>
VirtualInjectionGenerator.Generate(profile, DateTimeOffset.UtcNow, SmvTrustState.Healthy));
}

Expand Down
Loading