diff --git a/test/AssociationRegistry.Test.Public.Api/Framework/CaseSensitiveComparer.cs b/test/AssociationRegistry.Test.Public.Api/Framework/CaseSensitiveComparer.cs new file mode 100644 index 000000000..c9c8b7b30 --- /dev/null +++ b/test/AssociationRegistry.Test.Public.Api/Framework/CaseSensitiveComparer.cs @@ -0,0 +1,7 @@ +namespace AssociationRegistry.Test.Public.Api.Framework; + +public class CaseSensitiveComparer : IComparer +{ + public int Compare(string? x, string? y) + => string.Compare(x, y, StringComparison.Ordinal); +} diff --git a/test/AssociationRegistry.Test.Public.Api/When_Searching/With_Sorting/Given_Sort_By_SingleField.cs b/test/AssociationRegistry.Test.Public.Api/When_Searching/With_Sorting/Given_Sort_By_SingleField.cs index 6b18b970e..19d43b60e 100644 --- a/test/AssociationRegistry.Test.Public.Api/When_Searching/With_Sorting/Given_Sort_By_SingleField.cs +++ b/test/AssociationRegistry.Test.Public.Api/When_Searching/With_Sorting/Given_Sort_By_SingleField.cs @@ -3,6 +3,7 @@ namespace AssociationRegistry.Test.Public.Api.When_Searching.With_Sorting; using Fixtures; using Fixtures.GivenEvents; using FluentAssertions; +using Framework; using Newtonsoft.Json.Linq; using Xunit; using Xunit.Abstractions; @@ -39,7 +40,7 @@ public Given_Sort_By_SingleField(GivenEventsFixture fixture, ITestOutputHelper h .ToList(); names.Should().NotBeEmpty(); - names.Should().BeInAscendingOrder(); + names.Should().BeInAscendingOrder(new CaseSensitiveComparer()); names.ForEach(_outputHelper.WriteLine); } @@ -59,7 +60,7 @@ public Given_Sort_By_SingleField(GivenEventsFixture fixture, ITestOutputHelper h .ToList(); names.Should().NotBeEmpty(); - names.Should().BeInDescendingOrder(); + names.Should().BeInDescendingOrder(new CaseSensitiveComparer()); names.ForEach(_outputHelper.WriteLine); } }