Skip to content

Commit

Permalink
UT for checking case insensitive profile properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
lovababu committed Jul 18, 2023
1 parent 0eb4427 commit 249f67e
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ public void profilesCanContainProperties() {
.isEqualTo(profiles(profile("foo", property("name", "value"))));
}

@Test
public void profilesCanContainPropertiesWithMixedCase() {
Map<String, Profile> profiles = profiles(profile("foo", property("name", "value")));
assertThat(configFileProfiles("[profile foo]\n" +
"Name = value"))
.isEqualTo(profiles);

profiles.forEach((s, profile) -> {
assertThat(s).isEqualTo("foo");
assertThat(profile.properties().containsKey("NAME")).isTrue();
assertThat(profile.properties().containsKey("Name")).isTrue();
assertThat(profile.properties().containsKey("naMe")).isTrue();
assertThat(profile.properties().containsKey("name")).isTrue();
});
}

@Test
public void windowsStyleLineEndingsAreSupported() {
assertThat(configFileProfiles("[profile foo]\r\n" +
Expand Down

0 comments on commit 249f67e

Please sign in to comment.