Test for <util:map> with LinkedCaseInsensitiveMap and specified key/value types
Issue: SPR-10994
This commit is contained in:
@@ -36,6 +36,7 @@ import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.tests.beans.CollectingReaderEventListener;
|
||||
import org.springframework.tests.sample.beans.CustomEnum;
|
||||
import org.springframework.tests.sample.beans.TestBean;
|
||||
import org.springframework.util.LinkedCaseInsensitiveMap;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@@ -162,6 +163,13 @@ public class UtilNamespaceHandlerTests {
|
||||
assertEquals(this.beanFactory.getBean("testBean"), map.get("bean"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMapWithTypes() {
|
||||
Map map = (Map) this.beanFactory.getBean("mapWithTypes");
|
||||
assertTrue(map instanceof LinkedCaseInsensitiveMap);
|
||||
assertEquals(this.beanFactory.getBean("testBean"), map.get("bean"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNestedCollections() {
|
||||
TestBean bean = (TestBean) this.beanFactory.getBean("nestedCollectionsBean");
|
||||
|
||||
Reference in New Issue
Block a user