Skip to content

Commit

Permalink
use invariant culture in FakeLogger tests(#5841)
Browse files Browse the repository at this point in the history
Co-authored-by: Tomáš Wiesner <[email protected]>
  • Loading branch information
Demo30 and Tomáš Wiesner authored Feb 4, 2025
1 parent 939513c commit 1a847c1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ async static (logCollector, client) =>

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

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

Assert.Equal(3, secondState!.Count);
Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1);
Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.CurrentCulture));
Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture));
});
}

Expand Down

0 comments on commit 1a847c1

Please sign in to comment.