Java 类org.springframework.boot.bind.RelaxedDataBinderTests.TargetWithNestedObject 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BindingPreparationTests.java   
@Test
public void testBeanWrapperCreatesNewObjects() throws Exception {
    TargetWithNestedObject target = new TargetWithNestedObject();
    BeanWrapperImpl wrapper = new BeanWrapperImpl(target);
    wrapper.setAutoGrowNestedPaths(true);
    // For a nested object, you have to set a property for it to be created
    wrapper.setPropertyValue("nested.foo", "bar");
    wrapper.getPropertyValue("nested");
    assertThat(wrapper.getPropertyValue("nested")).isNotNull();
}
项目:spring-boot-concourse    文件:BindingPreparationTests.java   
@Test
public void testBeanWrapperCreatesNewObjects() throws Exception {
    TargetWithNestedObject target = new TargetWithNestedObject();
    BeanWrapperImpl wrapper = new BeanWrapperImpl(target);
    wrapper.setAutoGrowNestedPaths(true);
    // For a nested object, you have to set a property for it to be created
    wrapper.setPropertyValue("nested.foo", "bar");
    wrapper.getPropertyValue("nested");
    assertThat(wrapper.getPropertyValue("nested")).isNotNull();
}
项目:contestparser    文件:BindingPreparationTests.java   
@Test
public void testBeanWrapperCreatesNewObjects() throws Exception {
    TargetWithNestedObject target = new TargetWithNestedObject();
    BeanWrapperImpl wrapper = new BeanWrapperImpl(target);
    wrapper.setAutoGrowNestedPaths(true);
    // For a nested object, you have to set a property for it to be created
    wrapper.setPropertyValue("nested.foo", "bar");
    wrapper.getPropertyValue("nested");
    assertNotNull(wrapper.getPropertyValue("nested"));
}