|
|
@ -15,17 +15,14 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package org.springframework.core.convert; |
|
|
|
package org.springframework.core.convert; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static junit.framework.Assert.assertEquals; |
|
|
|
import static junit.framework.Assert.assertEquals; |
|
|
|
import static junit.framework.Assert.assertNull; |
|
|
|
|
|
|
|
import static junit.framework.Assert.assertSame; |
|
|
|
|
|
|
|
import static junit.framework.Assert.assertTrue; |
|
|
|
import static junit.framework.Assert.assertTrue; |
|
|
|
import static junit.framework.Assert.fail; |
|
|
|
|
|
|
|
import static org.junit.Assert.assertFalse; |
|
|
|
import static org.junit.Assert.assertFalse; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author Andy Clement |
|
|
|
* @author Andy Clement |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -35,6 +32,12 @@ public class TypeDescriptorTests { |
|
|
|
int[] intArray; |
|
|
|
int[] intArray; |
|
|
|
List<String>[] arrayOfListOfString; |
|
|
|
List<String>[] arrayOfListOfString; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testWrapperType() { |
|
|
|
|
|
|
|
TypeDescriptor desc = TypeDescriptor.valueOf(int.class); |
|
|
|
|
|
|
|
assertEquals(Integer.class, desc.getType()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void listDescriptors() throws Exception { |
|
|
|
public void listDescriptors() throws Exception { |
|
|
|
TypeDescriptor typeDescriptor = new TypeDescriptor(TypeDescriptorTests.class.getDeclaredField("listOfString")); |
|
|
|
TypeDescriptor typeDescriptor = new TypeDescriptor(TypeDescriptorTests.class.getDeclaredField("listOfString")); |
|
|
|