Skip to content

Commit 9d194c2

Browse files
committed
Add test to verify binding of a property with all upper-case suffix
See gh-5330
1 parent c1fcecb commit 9d194c2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spring-boot/src/test/java/org/springframework/boot/bind/PropertiesConfigurationFactoryTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ public void testBindWithDelimitedPrefixUsingDifferentDelimiter() throws Exceptio
164164
assertEquals("blah", foo.name);
165165
}
166166

167+
@Test
168+
public void propertyWithAllUpperCaseSuffixCanBeBound() throws Exception {
169+
Foo foo = createFoo("foo-bar-u-r-i:baz");
170+
assertEquals("baz", foo.fooBarURI);
171+
}
172+
167173
private Foo createFoo(final String values) throws Exception {
168174
setupFactory();
169175
return bindFoo(values);
@@ -195,6 +201,8 @@ public static class Foo {
195201

196202
private String fooBar;
197203

204+
private String fooBarURI;
205+
198206
public String getSpringFooBaz() {
199207
return this.spring_foo_baz;
200208
}
@@ -227,6 +235,14 @@ public void setFooBar(String fooBar) {
227235
this.fooBar = fooBar;
228236
}
229237

238+
public String getFooBarURI() {
239+
return this.fooBarURI;
240+
}
241+
242+
public void setFooBarURI(String fooBarURI) {
243+
this.fooBarURI = fooBarURI;
244+
}
245+
230246
}
231247

232248
}

0 commit comments

Comments
 (0)