mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-21 21:39:05 +00:00
BeanWrapper does not attempt to populate Map values on access (just auto-grows Map itself)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3756 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+2
-9
@@ -129,17 +129,10 @@ public class BeanWrapperAutoGrowingTests {
|
||||
wrapper.getPropertyValue("listNotParameterized[0]");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getPropertyValueAutoGrowMap() {
|
||||
assertNotNull(wrapper.getPropertyValue("map[A]"));
|
||||
assertEquals(1, bean.getMap().size());
|
||||
assertTrue(bean.getMap().get("A") instanceof Bean);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setPropertyValueAutoGrowMap() {
|
||||
wrapper.setPropertyValue("map[A].prop", "test");
|
||||
assertEquals("test", bean.getMap().get("A").getProp());
|
||||
wrapper.setPropertyValue("map[A]", new Bean());
|
||||
assertTrue(bean.getMap().get("A") instanceof Bean);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user