Skip to content

Assertions against case insensitive Set don't work #4157

@rstoyanchev

Description

@rstoyanchev

Similar to #2159, but for a Set:

HttpHeaders headers = new HttpHeaders();
headers.add("Header", "foo");

// case-insensitive
Set<String> set = headers.headerNames();

Assertions.assertThat(set.contains("header")).isTrue(); // succeeds
Assertions.assertThat(set).contains("header"); // fails

This is org.springframework.http.HttpHeaders, but applies to any case-insensitive Set.

Impacted Assertions

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions