javadoc and polishing

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4454 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Keith Donald
2011-06-05 07:14:34 +00:00
parent 4afc2c926d
commit 911eb5fca8
4 changed files with 51 additions and 11 deletions
@@ -514,6 +514,12 @@ public class TypeDescriptorTests {
assertEquals(String.class, t1.getType());
}
@Test(expected=IllegalStateException.class)
public void nestedTooManyLevels() throws Exception {
TypeDescriptor t1 = TypeDescriptor.nested(new MethodParameter(getClass().getMethod("test4", List.class), 0), 3);
assertEquals(String.class, t1.getType());
}
@Test(expected=IllegalStateException.class)
public void nestedMethodParameterTypeNotNestable() throws Exception {
TypeDescriptor.nested(new MethodParameter(getClass().getMethod("test5", String.class), 0), 2);
@@ -543,7 +549,20 @@ public class TypeDescriptorTests {
public void test5(String param1) {
}
@Test
public void nestedNotParameterized() throws Exception {
TypeDescriptor t1 = TypeDescriptor.nested(new MethodParameter(getClass().getMethod("test6", List.class), 0), 1);
assertEquals(List.class,t1.getType());
assertEquals("java.util.List<?>", t1.toString());
TypeDescriptor t2 = TypeDescriptor.nested(new MethodParameter(getClass().getMethod("test6", List.class), 0), 2);
assertNull(t2);
}
public void test6(List<List> param1) {
}
@Test
public void nestedFieldTypeMapTwoLevels() throws Exception {
TypeDescriptor t1 = TypeDescriptor.nested(getClass().getField("test4"), 2);