mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Add test for #234 - Not-trimmed values in configuration properties
This commit is contained in:
@@ -17,6 +17,23 @@ public class PropertiesWrapperTest {
|
||||
assertEquals("myserver", pw.getServerName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTrimPropertyValues() {
|
||||
|
||||
Properties properties = new Properties();
|
||||
properties.put("someBasic"," hello ");
|
||||
properties.put("someInt"," 42 ");
|
||||
properties.put("noTrimReqr","jim");
|
||||
properties.put("includeSpaces"," jim bob ");
|
||||
|
||||
PropertiesWrapper pw = new PropertiesWrapper("pref", "myserver", properties);
|
||||
assertEquals("hello",pw.get("someBasic"));
|
||||
assertEquals(42, pw.getInt("someInt", 1));
|
||||
assertNull(pw.get("doesNotExist", null));
|
||||
assertEquals("jim",pw.get("noTrimReqr"));
|
||||
assertEquals("jim bob",pw.get("includeSpaces"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetProperties() throws Exception {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user