List of usage examples for org.springframework.beans BeanWrapperImpl useConfigValueEditors
public void useConfigValueEditors()
From source file:org.springframework.beans.BeanWrapperTests.java
@Test public void testStringArrayPropertyWithStringSplitting() throws Exception { PropsTester pt = new PropsTester(); BeanWrapperImpl bw = new BeanWrapperImpl(pt); bw.useConfigValueEditors(); bw.setPropertyValue("stringArray", "a1,b2"); assertTrue("stringArray length = 2", pt.stringArray.length == 2); assertTrue("correct values", pt.stringArray[0].equals("a1") && pt.stringArray[1].equals("b2")); }
From source file:org.springframework.beans.BeanWrapperTests.java
@Test public void testIntArrayPropertyWithStringSplitting() throws Exception { PropsTester pt = new PropsTester(); BeanWrapperImpl bw = new BeanWrapperImpl(pt); bw.useConfigValueEditors(); bw.setPropertyValue("intArray", "4,5"); assertTrue("intArray length = 2", pt.intArray.length == 2); assertTrue("correct values", pt.intArray[0] == 4 && pt.intArray[1] == 5); }