Browse Source

SPR-6972: failed attempt to reproduce issue

pull/23217/head
Chris Beams 16 years ago
parent
commit
77bb68b967
  1. 36
      org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java
  2. 16
      org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml

36
org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
package org.springframework.beans;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.Map;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
public class Spr6972Tests {
@Test
public void repro() {
BeanFactory bf = new XmlBeanFactory(new ClassPathResource("Spr6972Tests-context.xml", this.getClass()));
TestSpringBean bean = bf.getBean(TestSpringBean.class);
assertTrue(bean.bool);
assertNotNull(bean.map);
}
}
class TestSpringBean {
boolean bool;
Map<String, String> map;
public TestSpringBean(boolean bool, Map<String, String> map) {
this.bool = bool;
this.map = map;
}
public TestSpringBean(Map<String, String> map) {
this(true, map);
}
}

16
org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="testSpringBean" class="org.springframework.beans.TestSpringBean">
<constructor-arg>
<map>
<entry><key><value>entry1</value></key><value>string1</value></entry>
<entry><key><value>entry2</value></key><value>string2</value></entry>
<entry><key><value>entry3</value></key><value>string3</value></entry>
<entry><key><value>entry4</value></key><value>string4</value></entry>
</map>
</constructor-arg>
</bean>
</beans>
Loading…
Cancel
Save