Skip to content

Commit 1a847c1

Browse files
Demo30Tomáš Wiesner
andauthored
use invariant culture in FakeLogger tests(#5841)
Co-authored-by: Tomáš Wiesner <[email protected]>
1 parent 939513c commit 1a847c1

File tree

1 file changed

+3
-3
lines changed
  • test/Libraries/Microsoft.AspNetCore.Diagnostics.Middleware.Tests/Logging

1 file changed

+3
-3
lines changed

test/Libraries/Microsoft.AspNetCore.Diagnostics.Middleware.Tests/Logging/AcceptanceTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ async static (logCollector, client) =>
419419

420420
Assert.Equal(9, state!.Count);
421421
Assert.Single(state, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1);
422-
Assert.Single(state, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.CurrentCulture));
422+
Assert.Single(state, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture));
423423
Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Delete.ToString());
424424
Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.RequestBody);
425425
Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.ResponseBody);
@@ -493,11 +493,11 @@ async static (logCollector, client) =>
493493

494494
Assert.Equal(5, firstState!.Count);
495495
Assert.DoesNotContain(firstState, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1);
496-
Assert.DoesNotContain(firstState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.CurrentCulture));
496+
Assert.DoesNotContain(firstState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture));
497497

498498
Assert.Equal(3, secondState!.Count);
499499
Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1);
500-
Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.CurrentCulture));
500+
Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture));
501501
});
502502
}
503503

0 commit comments

Comments
 (0)