mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Add test to verify binding of a property with all upper-case suffix
See gh-5330
This commit is contained in:
parent
c1fcecb415
commit
9d194c2d43
@ -164,6 +164,12 @@ public class PropertiesConfigurationFactoryTests {
|
||||
assertEquals("blah", foo.name);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void propertyWithAllUpperCaseSuffixCanBeBound() throws Exception {
|
||||
Foo foo = createFoo("foo-bar-u-r-i:baz");
|
||||
assertEquals("baz", foo.fooBarURI);
|
||||
}
|
||||
|
||||
private Foo createFoo(final String values) throws Exception {
|
||||
setupFactory();
|
||||
return bindFoo(values);
|
||||
@ -195,6 +201,8 @@ public class PropertiesConfigurationFactoryTests {
|
||||
|
||||
private String fooBar;
|
||||
|
||||
private String fooBarURI;
|
||||
|
||||
public String getSpringFooBaz() {
|
||||
return this.spring_foo_baz;
|
||||
}
|
||||
@ -227,6 +235,14 @@ public class PropertiesConfigurationFactoryTests {
|
||||
this.fooBar = fooBar;
|
||||
}
|
||||
|
||||
public String getFooBarURI() {
|
||||
return this.fooBarURI;
|
||||
}
|
||||
|
||||
public void setFooBarURI(String fooBarURI) {
|
||||
this.fooBarURI = fooBarURI;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user