Skip to content

Commit 61ec479

Browse files
committed
UnitSystemTests: Fix flaky test due to caching
When running multiple tests, the order of test execution affected the result of one test.
1 parent c7f794f commit 61ec479

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UnitsNet.Tests/UnitSystemTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public void ToString_WithRussianCulture()
404404
[Fact]
405405
public void GetDefaultAbbreviationFallsBackToDefaultStringIfNotSpecified()
406406
{
407-
UnitSystem usUnits = UnitSystem.GetCached(AmericanCultureName);
407+
UnitSystem usUnits = new UnitSystem(AmericanCultureName);
408408
string abbreviation = usUnits.GetDefaultAbbreviation(CustomUnit.Unit1);
409409
Assert.Equal("(no abbreviation for CustomUnit.Unit1)", abbreviation);
410410
}

0 commit comments

Comments
 (0)