Skip to content

Commit

Permalink
fix: or-1759 compare case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
koenmetsu authored and talboomerik committed Nov 15, 2023
1 parent a5ed8d8 commit 97cf254
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace AssociationRegistry.Test.Public.Api.Framework;

public class CaseSensitiveComparer : IComparer<string>
{
public int Compare(string? x, string? y)
=> string.Compare(x, y, StringComparison.Ordinal);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}
}

0 comments on commit 97cf254

Please sign in to comment.