File tree 2 files changed +13
-0
lines changed
java/org/springframework/beans/factory/xml
resources/org/springframework/beans/factory/xml 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 36
36
import org .springframework .tests .beans .CollectingReaderEventListener ;
37
37
import org .springframework .tests .sample .beans .CustomEnum ;
38
38
import org .springframework .tests .sample .beans .TestBean ;
39
+ import org .springframework .util .LinkedCaseInsensitiveMap ;
39
40
40
41
import static org .junit .Assert .*;
41
42
@@ -162,6 +163,13 @@ public void testMapWithRef() {
162
163
assertEquals (this .beanFactory .getBean ("testBean" ), map .get ("bean" ));
163
164
}
164
165
166
+ @ Test
167
+ public void testMapWithTypes () {
168
+ Map map = (Map ) this .beanFactory .getBean ("mapWithTypes" );
169
+ assertTrue (map instanceof LinkedCaseInsensitiveMap );
170
+ assertEquals (this .beanFactory .getBean ("testBean" ), map .get ("bean" ));
171
+ }
172
+
165
173
@ Test
166
174
public void testNestedCollections () {
167
175
TestBean bean = (TestBean ) this .beanFactory .getBean ("nestedCollectionsBean" );
Original file line number Diff line number Diff line change 49
49
<entry key =" bean" value-ref =" testBean" />
50
50
</util : map >
51
51
52
+ <util : map id =" mapWithTypes" map-class =" org.springframework.util.LinkedCaseInsensitiveMap"
53
+ key-type =" java.lang.String" value-type =" org.springframework.tests.sample.beans.TestBean" >
54
+ <entry key =" bean" value-ref =" testBean" />
55
+ </util : map >
56
+
52
57
<util : list id =" simpleList" >
53
58
<value >Rob Harrop</value >
54
59
</util : list >
You can’t perform that action at this time.
0 commit comments