Summary
This test should pass but fails.
@Test
void should_pass_if_case_insensitive_actual_contains_given_entries_in_rder() {
// GIVEN
actual = new CaseInsensitiveMap<>();
actual.put( "Color", "green" );
actual.put( "NAME", "Yoda" );
// THEN
maps.assertContainsExactly(someInfo(), actual, entry("COLOR", "green"), entry("Name", "Yoda"));
}
The underlying issue is when containsExactly verifies that the entries are in the same order, it ends up comparing "Color" against "COLOR" with equals instead of the actual map key comparison strategy (case insensitive string in the example).
It's not yet clear if there is a way to address this issue, if not we would have to mention the limitation in the javadoc.
Summary
This test should pass but fails.
The underlying issue is when
containsExactlyverifies that the entries are in the same order, it ends up comparing"Color"against"COLOR"withequalsinstead of the actual map key comparison strategy (case insensitive string in the example).It's not yet clear if there is a way to address this issue, if not we would have to mention the limitation in the javadoc.