1
1
/*
2
- * Copyright 2002-2009 the original author or authors.
2
+ * Copyright 2002-2011 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
16
16
17
17
package org .springframework .core .convert ;
18
18
19
- import static junit .framework .Assert .assertEquals ;
20
- import static junit .framework .Assert .assertTrue ;
21
- import static org .junit .Assert .assertFalse ;
22
- import static org .junit .Assert .assertNotNull ;
23
- import static org .junit .Assert .assertNull ;
24
-
25
19
import java .lang .annotation .ElementType ;
26
20
import java .lang .annotation .Retention ;
27
21
import java .lang .annotation .RetentionPolicy ;
33
27
import java .util .List ;
34
28
import java .util .Map ;
35
29
36
- import org .junit .Ignore ;
37
30
import org .junit .Test ;
31
+
38
32
import org .springframework .core .MethodParameter ;
39
33
34
+ import static junit .framework .Assert .assertEquals ;
35
+ import static junit .framework .Assert .assertTrue ;
36
+ import static org .junit .Assert .assertFalse ;
37
+ import static org .junit .Assert .assertNotNull ;
38
+ import static org .junit .Assert .assertNull ;
39
+
40
40
/**
41
41
* @author Keith Donald
42
42
* @author Andy Clement
@@ -397,12 +397,11 @@ public void fieldArray() throws Exception {
397
397
}
398
398
399
399
@ Test
400
- @ Ignore
401
400
public void fieldComplexTypeDescriptor () throws Exception {
402
401
TypeDescriptor typeDescriptor = new TypeDescriptor (TypeDescriptorTests .class .getDeclaredField ("arrayOfListOfString" ));
403
402
assertTrue (typeDescriptor .isArray ());
404
- assertEquals (List .class ,typeDescriptor .getElementTypeDescriptor ());
405
- assertEquals (String .class , typeDescriptor .getElementTypeDescriptor ().getElementTypeDescriptor ());
403
+ assertEquals (List .class ,typeDescriptor .getElementTypeDescriptor (). getType () );
404
+ assertEquals (String .class , typeDescriptor .getElementTypeDescriptor ().getElementTypeDescriptor (). getType () );
406
405
assertEquals ("java.util.List[]" ,typeDescriptor .toString ());
407
406
}
408
407
@@ -417,13 +416,11 @@ public void fieldComplexTypeDescriptor2() throws Exception {
417
416
}
418
417
419
418
@ Test
420
- @ Ignore
421
419
public void fieldMap () throws Exception {
422
- // TODO: SPR-8394: typeIndex handling not currently supported by fields
423
- TypeDescriptor desc = new TypeDescriptor (getClass ().getField ("fieldMap" ));
420
+ TypeDescriptor desc = new TypeDescriptor (TypeDescriptorTests .class .getField ("fieldMap" ));
424
421
assertTrue (desc .isMap ());
425
- assertEquals (Integer .class , desc .getMapKeyTypeDescriptor ().getElementTypeDescriptor ());
426
- assertEquals (Long .class , desc .getMapValueTypeDescriptor ().getElementTypeDescriptor ());
422
+ assertEquals (Integer .class , desc .getMapKeyTypeDescriptor ().getElementTypeDescriptor (). getType () );
423
+ assertEquals (Long .class , desc .getMapValueTypeDescriptor ().getElementTypeDescriptor (). getType () );
427
424
}
428
425
429
426
public Map <List <Integer >, List <Long >> fieldMap ;
0 commit comments