Skip to content
Merged
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
5 changes: 3 additions & 2 deletions UnitsNet.Tests/QuantityFormatterTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen ([email protected]). Maintained at https://github.com/angularsen/UnitsNet.

using System.Globalization;
using Xunit;

namespace UnitsNet.Tests
Expand Down Expand Up @@ -108,7 +109,7 @@ public static void StandardNumericFormatStrings_Equals_ValueWithFormatStringAndA
{
var length = Length.FromMeters(123456789.987654321);

var expected = string.Format($"{{0:{format}}} {{1:a}}", length.Value, length);
var expected = string.Format(CultureInfo.CurrentUICulture, $"{{0:{format}}} {{1:a}}", length.Value, length);
Assert.Equal(expected, QuantityFormatter.Format(length, format));
}

Expand All @@ -132,7 +133,7 @@ public static void CustomNumericFormatStrings_Equals_ValueWithFormatStringAndAbb
{
var length = Length.FromMeters(123456789.987654321);

var expected = string.Format($"{{0:{format}}} {{1:a}}", length.Value, length);
var expected = string.Format(CultureInfo.CurrentUICulture, $"{{0:{format}}} {{1:a}}", length.Value, length);
Assert.Equal(expected, QuantityFormatter.Format(length, format));
}
}
Expand Down