mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-08 02:09:06 +00:00
Add another ConfigurationPropertyName.equals test
Include an additional test to ensure that `.equals` works for names starting with the same value. See gh-14665
This commit is contained in:
+9
@@ -582,6 +582,15 @@ public class ConfigurationPropertyNameTests {
|
||||
assertThat((Object) n14).isNotEqualTo(n15);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void equalsWhenStartsWith() {
|
||||
// gh-14665
|
||||
ConfigurationPropertyName n1 = ConfigurationPropertyName.of("my.sources[0].xame");
|
||||
ConfigurationPropertyName n2 = ConfigurationPropertyName
|
||||
.of("my.sources[0].xamespace");
|
||||
assertThat(n1).isNotEqualTo(n2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isValidWhenValidShouldReturnTrue() {
|
||||
assertThat(ConfigurationPropertyName.isValid("")).isTrue();
|
||||
|
||||
Reference in New Issue
Block a user