From 9d194c2d437533249f46de983c1f74178216b50e Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 20 Jun 2016 20:23:18 +0100 Subject: [PATCH] Add test to verify binding of a property with all upper-case suffix See gh-5330 --- .../PropertiesConfigurationFactoryTests.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spring-boot/src/test/java/org/springframework/boot/bind/PropertiesConfigurationFactoryTests.java b/spring-boot/src/test/java/org/springframework/boot/bind/PropertiesConfigurationFactoryTests.java index dbe8e70d69..49f0392eea 100644 --- a/spring-boot/src/test/java/org/springframework/boot/bind/PropertiesConfigurationFactoryTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/bind/PropertiesConfigurationFactoryTests.java @@ -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; + } + } }