recursive mapping support

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2052 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Keith Donald
2009-10-05 20:28:10 +00:00
parent feaa82a874
commit 73cc1b9fbe
7 changed files with 151 additions and 6 deletions
@@ -142,11 +142,7 @@ public class SpelMapperTests {
mapper.addMapping("fullName", "name");
mapper.addMapping("sport", "favoriteSport");
mapper.addMapping("nested", "nested").setConverter(new Converter<NestedDto, Nested>() {
public Nested convert(NestedDto source) {
return (Nested) new SpelMapper().map(source, new Nested());
}
});
mapper.addMapping("nested", "nested");
mapper.map(source, target);
assertEquals("Keith Donald", target.name);