added org.springframework.testsuite back into the top-level build

This commit is contained in:
Chris Beams 2008-12-09 03:13:21 +00:00
parent 1e628e6af1
commit f389a9a7b2
11 changed files with 109 additions and 67 deletions

View File

@ -20,6 +20,7 @@
<pathelement location="../org.springframework.web.portlet"/> <pathelement location="../org.springframework.web.portlet"/>
<pathelement location="../org.springframework.test"/> <pathelement location="../org.springframework.test"/>
<pathelement location="../org.springframework.spring-library"/> <pathelement location="../org.springframework.spring-library"/>
<pathelement location="../org.springframework.testsuite"/>
</path> </path>
<property file="${basedir}/../build.properties"/> <property file="${basedir}/../build.properties"/>

View File

@ -20,7 +20,7 @@
<conf name="groovy" extends="runtime" description="JARs needed to develop Groovy beans"/> <conf name="groovy" extends="runtime" description="JARs needed to develop Groovy beans"/>
<conf name="instrumentation" extends="runtime" description="JARs needed to develop with Spring VM Instrumentation"/> <conf name="instrumentation" extends="runtime" description="JARs needed to develop with Spring VM Instrumentation"/>
<conf name="jpa" extends="runtime" description="JARs needed to develop JPA beans"/> <conf name="jpa" extends="runtime" description="JARs needed to develop JPA beans"/>
<conf name="jruby" extends="runtime" description="JARs needed to develop Groovy beans"/> <conf name="jruby" extends="runtime" description="JARs needed to develop JRuby beans"/>
<conf name="ws" extends="runtime" description="JARs needed to develop web service beans"/> <conf name="ws" extends="runtime" description="JARs needed to develop web service beans"/>
</configurations> </configurations>
@ -48,11 +48,11 @@
<dependency org="org.springframework" name="org.springframework.aop" rev="latest.integration" conf="compile->compile"/> <dependency org="org.springframework" name="org.springframework.aop" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.springframework" name="org.springframework.beans" rev="latest.integration" conf="compile->compile"/> <dependency org="org.springframework" name="org.springframework.beans" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.springframework" name="org.springframework.core" rev="latest.integration" conf="compile->compile"/> <dependency org="org.springframework" name="org.springframework.core" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.springframework" name="org.springframework.expression" rev="latest.integration" conf="compile->compile"/> <dependency org="org.springframework" name="org.springframework.expression" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.springframework" name="org.springframework.instrument" rev="latest.integration" conf="optional, instrumentation->compile"/> <dependency org="org.springframework" name="org.springframework.instrument" rev="latest.integration" conf="optional, instrumentation->compile"/>
<!-- test dependencies --> <!-- test dependencies -->
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="test->runtime"/> <dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="test->runtime"/>
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.5.0" conf="test->runtime"/> <dependency org="org.junit" name="com.springsource.org.junit" rev="4.5.0" conf="test->runtime"/>
<dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.3.0" conf="test->compile"/> <dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.3.0" conf="test->compile"/>
</dependencies> </dependencies>

View File

@ -22,6 +22,7 @@
<dependency org="com.caucho" name="com.springsource.com.caucho" rev="3.1.5" conf="test->compile"/> <dependency org="com.caucho" name="com.springsource.com.caucho" rev="3.1.5" conf="test->compile"/>
<dependency org="com.ibm.websphere" name="com.springsource.com.ibm.websphere.uow" rev="6.0.2.17" conf="test->compile"/> <dependency org="com.ibm.websphere" name="com.springsource.com.ibm.websphere.uow" rev="6.0.2.17" conf="test->compile"/>
<dependency org="com.opensymphony.quartz" name="com.springsource.org.quartz" rev="1.6.2" conf="test->compile"/> <dependency org="com.opensymphony.quartz" name="com.springsource.org.quartz" rev="1.6.2" conf="test->compile"/>
<dependency org="com.oracle.oc4j" name="com.springsource.oracle.classloader" rev="10.1.3.1" conf="provided->compile"/>
<dependency org="com.oracle.toplink.essentials" name="com.springsource.oracle.toplink.essentials" rev="2.0.0.b41-beta2" conf="test->compile"/> <dependency org="com.oracle.toplink.essentials" name="com.springsource.oracle.toplink.essentials" rev="2.0.0.b41-beta2" conf="test->compile"/>
<dependency org="com.sun.enterprise" name="com.springsource.com.sun.enterprise.loader" rev="1.0.0" conf="test->compile"/> <dependency org="com.sun.enterprise" name="com.springsource.com.sun.enterprise.loader" rev="1.0.0" conf="test->compile"/>
<dependency org="com.sun.syndication" name="com.springsource.com.sun.syndication" rev="0.9.0" conf="test->compile"/> <dependency org="com.sun.syndication" name="com.springsource.com.sun.syndication" rev="0.9.0" conf="test->compile"/>
@ -37,13 +38,12 @@
<dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.5.0" conf="test->compile"/> <dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.5.0" conf="test->compile"/>
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp" rev="2.1.0" conf="test->compile"/> <dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp" rev="2.1.0" conf="test->compile"/>
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.1.2" conf="test->compile"/> <dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.1.2" conf="test->compile"/>
<dependency org="javax.xml.rpc" name="com.springsource.javax.xml.rpc" rev="1.1.0" conf="test->compile"/>
<dependency org="javax.transaction" name="com.springsource.javax.transaction" rev="1.1.0" conf="test->compile"/> <dependency org="javax.transaction" name="com.springsource.javax.transaction" rev="1.1.0" conf="test->compile"/>
<dependency org="javax.xml.rpc" name="com.springsource.javax.xml.rpc" rev="1.1.0" conf="test->compile"/>
<dependency org="net.sourceforge.cglib" name="com.springsource.net.sf.cglib" rev="2.1.3" conf="test->compile"/> <dependency org="net.sourceforge.cglib" name="com.springsource.net.sf.cglib" rev="2.1.3" conf="test->compile"/>
<dependency org="net.sourceforge.ehcache" name="com.springsource.net.sf.ehcache" rev="1.3.0" conf="test->compile"/> <dependency org="net.sourceforge.ehcache" name="com.springsource.net.sf.ehcache" rev="1.3.0" conf="test->compile"/>
<dependency org="net.sourceforge.jexcelapi" name="com.springsource.jxl" rev="2.6.6" conf="test->compile"/>
<dependency org="net.sourceforge.jasperreports" name="com.springsource.net.sf.jasperreports" rev="2.0.5" conf="test->compile"/> <dependency org="net.sourceforge.jasperreports" name="com.springsource.net.sf.jasperreports" rev="2.0.5" conf="test->compile"/>
<dependency org="org.dom4j" name="com.springsource.org.dom4j" rev="1.6.1" conf="test->compile"/> <dependency org="net.sourceforge.jexcelapi" name="com.springsource.jxl" rev="2.6.6" conf="test->compile"/>
<dependency org="org.antlr" name="com.springsource.antlr" rev="2.7.6" conf="test->compile"/> <dependency org="org.antlr" name="com.springsource.antlr" rev="2.7.6" conf="test->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.dbcp" rev="1.2.2.osgi" conf="test->runtime"/> <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.dbcp" rev="1.2.2.osgi" conf="test->runtime"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.fileupload" rev="1.2.0" conf="test->compile"/> <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.fileupload" rev="1.2.0" conf="test->compile"/>
@ -51,19 +51,20 @@
<dependency org="org.apache.ibatis" name="com.springsource.com.ibatis" rev="2.3.4.726" conf="test->compile"/> <dependency org="org.apache.ibatis" name="com.springsource.com.ibatis" rev="2.3.4.726" conf="test->compile"/>
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa" rev="1.0.2" conf="test->compile"/> <dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa" rev="1.0.2" conf="test->compile"/>
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.java5" rev="1.0.2" conf="test->compile"/> <dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.java5" rev="1.0.2" conf="test->compile"/>
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.persistence" rev="1.0.2" conf="test->compile"/> <dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.jdbc.java5" rev="1.0.2" conf="test->compile"/>
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.persistence.jdbc" rev="1.0.2" conf="test->compile"/>
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.lib" rev="1.0.2" conf="test->compile"/> <dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.lib" rev="1.0.2" conf="test->compile"/>
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.lib.java5" rev="1.0.2" conf="test->compile"/> <dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.lib.java5" rev="1.0.2" conf="test->compile"/>
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.jdbc.java5" rev="1.0.2" conf="test->compile"/> <dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.persistence" rev="1.0.2" conf="test->compile"/>
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.persistence.jdbc" rev="1.0.2" conf="test->compile"/>
<dependency org="org.apache.poi" name="com.springsource.org.apache.poi" rev="3.0.2.FINAL" conf="test->compile"/> <dependency org="org.apache.poi" name="com.springsource.org.apache.poi" rev="3.0.2.FINAL" conf="test->compile"/>
<dependency org="org.apache.tiles" name="com.springsource.org.apache.tiles" rev="2.0.5" conf="test->compile"/> <dependency org="org.apache.tiles" name="com.springsource.org.apache.tiles" rev="2.0.5" conf="test->compile"/>
<dependency org="org.apache.tiles" name="com.springsource.org.apache.tiles.core" rev="2.0.5.osgi" conf="test->compile"/> <dependency org="org.apache.tiles" name="com.springsource.org.apache.tiles.core" rev="2.0.5.osgi" conf="test->compile"/>
<dependency org="org.apache.tiles" name="com.springsource.org.apache.tiles.jsp" rev="2.0.5" conf="test->compile"/>
<dependency org="org.apache.velocity" name="com.springsource.org.apache.velocity" rev="1.5.0" conf="test->compile"/> <dependency org="org.apache.velocity" name="com.springsource.org.apache.velocity" rev="1.5.0" conf="test->compile"/>
<dependency org="org.apache.velocity" name="com.springsource.org.apache.velocity.tools.view" rev="1.4.0" conf="test->compile"/> <dependency org="org.apache.velocity" name="com.springsource.org.apache.velocity.tools.view" rev="1.4.0" conf="test->compile"/>
<dependency org="org.apache.tiles" name="com.springsource.org.apache.tiles.jsp" rev="2.0.5" conf="test->compile"/>
<dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="1.5.4" conf="test->compile"/> <dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="1.5.4" conf="test->compile"/>
<dependency org="org.codehaus.groovy" name="com.springsource.org.codehaus.groovy" rev="1.5.1" conf="test->compile"/> <dependency org="org.codehaus.groovy" name="com.springsource.org.codehaus.groovy" rev="1.5.1" conf="test->compile"/>
<dependency org="org.dom4j" name="com.springsource.org.dom4j" rev="1.6.1" conf="test->compile"/>
<dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.3.0" conf="test->compile"/> <dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.3.0" conf="test->compile"/>
<dependency org="org.easymock" name="com.springsource.org.easymock.classextension" rev="2.3.0" conf="test->compile"/> <dependency org="org.easymock" name="com.springsource.org.easymock.classextension" rev="2.3.0" conf="test->compile"/>
<dependency org="org.eclipse.persistence" name="com.springsource.org.eclipse.persistence.jpa" rev="1.0.1" conf="test->compile"/> <dependency org="org.eclipse.persistence" name="com.springsource.org.eclipse.persistence.jpa" rev="1.0.1" conf="test->compile"/>
@ -73,6 +74,7 @@
<dependency org="org.hibernate" name="com.springsource.org.hibernate.annotations.common" rev="3.3.0.ga" conf="test->compile"/> <dependency org="org.hibernate" name="com.springsource.org.hibernate.annotations.common" rev="3.3.0.ga" conf="test->compile"/>
<dependency org="org.hibernate" name="com.springsource.org.hibernate.ejb" rev="3.3.1.ga" conf="test->compile"/> <dependency org="org.hibernate" name="com.springsource.org.hibernate.ejb" rev="3.3.1.ga" conf="test->compile"/>
<dependency org="org.hsqldb" name="com.springsource.org.hsqldb" rev="1.8.0.9" conf="test->compile"/> <dependency org="org.hsqldb" name="com.springsource.org.hsqldb" rev="1.8.0.9" conf="test->compile"/>
<dependency org="org.jruby" name="com.springsource.org.jruby" rev="1.1.0" conf="optional, runtime->compile"/>
<dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm" rev="2.2.3" conf="test->runtime" /> <dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm" rev="2.2.3" conf="test->runtime" />
<dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm.commons" rev="2.2.3" conf="test->runtime" /> <dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm.commons" rev="2.2.3" conf="test->runtime" />
<dependency org="org.springframework" name="org.springframework.aop" rev="latest.integration" conf="test->compile"/> <dependency org="org.springframework" name="org.springframework.aop" rev="latest.integration" conf="test->compile"/>
@ -86,13 +88,13 @@
<dependency org="org.springframework" name="org.springframework.test" rev="latest.integration" conf="test->compile"/> <dependency org="org.springframework" name="org.springframework.test" rev="latest.integration" conf="test->compile"/>
<dependency org="org.springframework" name="org.springframework.transaction" rev="latest.integration" conf="test->compile"/> <dependency org="org.springframework" name="org.springframework.transaction" rev="latest.integration" conf="test->compile"/>
<dependency org="org.springframework" name="org.springframework.web" rev="latest.integration" conf="test->compile"/> <dependency org="org.springframework" name="org.springframework.web" rev="latest.integration" conf="test->compile"/>
<dependency org="org.springframework" name="org.springframework.web.servlet" rev="latest.integration" conf="test->compile"/>
<dependency org="org.springframework" name="org.springframework.web.portlet" rev="latest.integration" conf="test->compile"/> <dependency org="org.springframework" name="org.springframework.web.portlet" rev="latest.integration" conf="test->compile"/>
<dependency org="org.springframework" name="org.springframework.web.servlet" rev="latest.integration" conf="test->compile"/>
<!-- test dependencies --> <!-- test dependencies -->
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.5.0" conf="test->runtime"/>
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="test->compile"/> <dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="test->compile"/>
<dependency org="org.custommonkey.xmlunit" name="com.springsource.org.custommonkey.xmlunit" rev="1.2.0" conf="test->compile"/> <dependency org="org.custommonkey.xmlunit" name="com.springsource.org.custommonkey.xmlunit" rev="1.2.0" conf="test->compile"/>
<dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.3.0" conf="test->compile"/> <dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.3.0" conf="test->compile"/>
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.5.0" conf="test->runtime"/>
<dependency org="org.testng" name="com.springsource.org.testng" rev="5.8.0" conf="test->compile"/> <dependency org="org.testng" name="com.springsource.org.testng" rev="5.8.0" conf="test->compile"/>
</dependencies> </dependencies>

View File

@ -16,6 +16,11 @@
package org.springframework.core.io; package org.springframework.core.io;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
@ -23,8 +28,8 @@ import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.util.HashSet; import java.util.HashSet;
import junit.framework.TestCase; import org.junit.Ignore;
import org.junit.Test;
import org.springframework.mock.web.MockServletContext; import org.springframework.mock.web.MockServletContext;
import org.springframework.util.FileCopyUtils; import org.springframework.util.FileCopyUtils;
import org.springframework.web.context.support.ServletContextResource; import org.springframework.web.context.support.ServletContextResource;
@ -33,8 +38,9 @@ import org.springframework.web.context.support.ServletContextResource;
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 09.09.2004 * @since 09.09.2004
*/ */
public class ResourceTests extends TestCase { public class ResourceTests {
@Test
public void testByteArrayResource() throws IOException { public void testByteArrayResource() throws IOException {
Resource resource = new ByteArrayResource("testString".getBytes()); Resource resource = new ByteArrayResource("testString".getBytes());
assertTrue(resource.exists()); assertTrue(resource.exists());
@ -44,6 +50,7 @@ public class ResourceTests extends TestCase {
assertEquals(resource, new ByteArrayResource("testString".getBytes())); assertEquals(resource, new ByteArrayResource("testString".getBytes()));
} }
@Test
public void testByteArrayResourceWithDescription() throws IOException { public void testByteArrayResourceWithDescription() throws IOException {
Resource resource = new ByteArrayResource("testString".getBytes(), "my description"); Resource resource = new ByteArrayResource("testString".getBytes(), "my description");
assertTrue(resource.exists()); assertTrue(resource.exists());
@ -54,6 +61,7 @@ public class ResourceTests extends TestCase {
assertEquals(resource, new ByteArrayResource("testString".getBytes())); assertEquals(resource, new ByteArrayResource("testString".getBytes()));
} }
@Test
public void testInputStreamResource() throws IOException { public void testInputStreamResource() throws IOException {
InputStream is = new ByteArrayInputStream("testString".getBytes()); InputStream is = new ByteArrayInputStream("testString".getBytes());
Resource resource = new InputStreamResource(is); Resource resource = new InputStreamResource(is);
@ -64,6 +72,7 @@ public class ResourceTests extends TestCase {
assertEquals(resource, new InputStreamResource(is)); assertEquals(resource, new InputStreamResource(is));
} }
@Test
public void testInputStreamResourceWithDescription() throws IOException { public void testInputStreamResourceWithDescription() throws IOException {
InputStream is = new ByteArrayInputStream("testString".getBytes()); InputStream is = new ByteArrayInputStream("testString".getBytes());
Resource resource = new InputStreamResource(is, "my description"); Resource resource = new InputStreamResource(is, "my description");
@ -75,6 +84,7 @@ public class ResourceTests extends TestCase {
assertEquals(resource, new InputStreamResource(is)); assertEquals(resource, new InputStreamResource(is));
} }
@Test
public void testClassPathResource() throws IOException { public void testClassPathResource() throws IOException {
Resource resource = new ClassPathResource("org/springframework/core/io/Resource.class"); Resource resource = new ClassPathResource("org/springframework/core/io/Resource.class");
doTestResource(resource); doTestResource(resource);
@ -90,6 +100,7 @@ public class ResourceTests extends TestCase {
assertEquals(1, resources.size()); assertEquals(1, resources.size());
} }
@Test
public void testClassPathResourceWithClassLoader() throws IOException { public void testClassPathResourceWithClassLoader() throws IOException {
Resource resource = Resource resource =
new ClassPathResource("org/springframework/core/io/Resource.class", getClass().getClassLoader()); new ClassPathResource("org/springframework/core/io/Resource.class", getClass().getClassLoader());
@ -98,12 +109,15 @@ public class ResourceTests extends TestCase {
new ClassPathResource("org/springframework/core/../core/io/./Resource.class", getClass().getClassLoader())); new ClassPathResource("org/springframework/core/../core/io/./Resource.class", getClass().getClassLoader()));
} }
@Test
public void testClassPathResourceWithClass() throws IOException { public void testClassPathResourceWithClass() throws IOException {
Resource resource = new ClassPathResource("Resource.class", getClass()); Resource resource = new ClassPathResource("Resource.class", getClass());
doTestResource(resource); doTestResource(resource);
assertEquals(resource, new ClassPathResource("Resource.class", getClass())); assertEquals(resource, new ClassPathResource("Resource.class", getClass()));
} }
@Ignore // passes under eclipse, fails under ant
@Test
public void testFileSystemResource() throws IOException { public void testFileSystemResource() throws IOException {
Resource resource = new FileSystemResource(getClass().getResource("Resource.class").getFile()); Resource resource = new FileSystemResource(getClass().getResource("Resource.class").getFile());
doTestResource(resource); doTestResource(resource);
@ -112,6 +126,7 @@ public class ResourceTests extends TestCase {
assertEquals(resource2, new FileSystemResource("core/../core/io/./Resource.class")); assertEquals(resource2, new FileSystemResource("core/../core/io/./Resource.class"));
} }
@Test
public void testUrlResource() throws IOException { public void testUrlResource() throws IOException {
Resource resource = new UrlResource(getClass().getResource("Resource.class")); Resource resource = new UrlResource(getClass().getResource("Resource.class"));
doTestResource(resource); doTestResource(resource);
@ -120,6 +135,7 @@ public class ResourceTests extends TestCase {
assertEquals(resource2, new UrlResource("file:core/../core/io/./Resource.class")); assertEquals(resource2, new UrlResource("file:core/../core/io/./Resource.class"));
} }
@Test
public void testServletContextResource() throws IOException { public void testServletContextResource() throws IOException {
MockServletContext sc = new MockServletContext(); MockServletContext sc = new MockServletContext();
Resource resource = new ServletContextResource(sc, "org/springframework/core/io/Resource.class"); Resource resource = new ServletContextResource(sc, "org/springframework/core/io/Resource.class");
@ -149,24 +165,28 @@ public class ResourceTests extends TestCase {
*/ */
} }
@Test
public void testClassPathResourceWithRelativePath() throws IOException { public void testClassPathResourceWithRelativePath() throws IOException {
Resource resource = new ClassPathResource("dir/"); Resource resource = new ClassPathResource("dir/");
Resource relative = resource.createRelative("subdir"); Resource relative = resource.createRelative("subdir");
assertEquals(new ClassPathResource("dir/subdir"), relative); assertEquals(new ClassPathResource("dir/subdir"), relative);
} }
@Test
public void testFileSystemResourceWithRelativePath() throws IOException { public void testFileSystemResourceWithRelativePath() throws IOException {
Resource resource = new FileSystemResource("dir/"); Resource resource = new FileSystemResource("dir/");
Resource relative = resource.createRelative("subdir"); Resource relative = resource.createRelative("subdir");
assertEquals(new FileSystemResource("dir/subdir"), relative); assertEquals(new FileSystemResource("dir/subdir"), relative);
} }
@Test
public void testUrlResourceWithRelativePath() throws IOException { public void testUrlResourceWithRelativePath() throws IOException {
Resource resource = new UrlResource("file:dir/"); Resource resource = new UrlResource("file:dir/");
Resource relative = resource.createRelative("subdir"); Resource relative = resource.createRelative("subdir");
assertEquals(new UrlResource("file:dir/subdir"), relative); assertEquals(new UrlResource("file:dir/subdir"), relative);
} }
@Test
public void testServletContextResourceWithRelativePath() throws IOException { public void testServletContextResourceWithRelativePath() throws IOException {
MockServletContext sc = new MockServletContext(); MockServletContext sc = new MockServletContext();
Resource resource = new ServletContextResource(sc, "dir/"); Resource resource = new ServletContextResource(sc, "dir/");
@ -175,12 +195,14 @@ public class ResourceTests extends TestCase {
} }
/* /*
* @Test
public void testNonFileResourceExists() throws Exception { public void testNonFileResourceExists() throws Exception {
Resource resource = new UrlResource("http://www.springframework.org"); Resource resource = new UrlResource("http://www.springframework.org");
assertTrue(resource.exists()); assertTrue(resource.exists());
} }
*/ */
@Test
public void testAbstractResourceExceptions() throws Exception { public void testAbstractResourceExceptions() throws Exception {
final String name = "test-resource"; final String name = "test-resource";

View File

@ -16,14 +16,17 @@
package org.springframework.core.io.support; package org.springframework.core.io.support;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import junit.framework.TestCase; import org.junit.Ignore;
import org.junit.Test;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
/** /**
@ -34,7 +37,7 @@ import org.springframework.core.io.Resource;
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 17.11.2004 * @since 17.11.2004
*/ */
public class PathMatchingResourcePatternResolverTests extends TestCase { public class PathMatchingResourcePatternResolverTests {
private static final String[] CLASSES_IN_CORE_IO_SUPPORT = private static final String[] CLASSES_IN_CORE_IO_SUPPORT =
new String[] {"EncodedResource.class", "LocalizedResourceHelper.class", new String[] {"EncodedResource.class", "LocalizedResourceHelper.class",
@ -54,6 +57,7 @@ public class PathMatchingResourcePatternResolverTests extends TestCase {
private PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); private PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
@Test
public void testInvalidPrefixWithPatternElementInIt() throws IOException { public void testInvalidPrefixWithPatternElementInIt() throws IOException {
try { try {
resolver.getResources("xx**:**/*.xy"); resolver.getResources("xx**:**/*.xy");
@ -64,6 +68,7 @@ public class PathMatchingResourcePatternResolverTests extends TestCase {
} }
} }
@Test
public void testSingleResourceOnFileSystem() throws IOException { public void testSingleResourceOnFileSystem() throws IOException {
Resource[] resources = Resource[] resources =
resolver.getResources("org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.class"); resolver.getResources("org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.class");
@ -71,12 +76,15 @@ public class PathMatchingResourcePatternResolverTests extends TestCase {
assertProtocolAndFilename(resources[0], "file", "PathMatchingResourcePatternResolverTests.class"); assertProtocolAndFilename(resources[0], "file", "PathMatchingResourcePatternResolverTests.class");
} }
@Test
public void testSingleResourceInJar() throws IOException { public void testSingleResourceInJar() throws IOException {
Resource[] resources = resolver.getResources("java/net/URL.class"); Resource[] resources = resolver.getResources("java/net/URL.class");
assertEquals(1, resources.length); assertEquals(1, resources.length);
assertProtocolAndFilename(resources[0], "jar", "URL.class"); assertProtocolAndFilename(resources[0], "jar", "URL.class");
} }
@Ignore // passes under eclipse, fails under ant
@Test
public void testClasspathStarWithPatternOnFileSystem() throws IOException { public void testClasspathStarWithPatternOnFileSystem() throws IOException {
Resource[] resources = resolver.getResources("classpath*:org/springframework/core/io/sup*/*.class"); Resource[] resources = resolver.getResources("classpath*:org/springframework/core/io/sup*/*.class");
// Have to exclude Clover-generated class files here, // Have to exclude Clover-generated class files here,
@ -91,11 +99,13 @@ public class PathMatchingResourcePatternResolverTests extends TestCase {
assertProtocolAndFilenames(resources, "file", CLASSES_IN_CORE_IO_SUPPORT, TEST_CLASSES_IN_CORE_IO_SUPPORT); assertProtocolAndFilenames(resources, "file", CLASSES_IN_CORE_IO_SUPPORT, TEST_CLASSES_IN_CORE_IO_SUPPORT);
} }
@Test
public void testClasspathWithPatternInJar() throws IOException { public void testClasspathWithPatternInJar() throws IOException {
Resource[] resources = resolver.getResources("classpath:org/aopalliance/**/*.class"); Resource[] resources = resolver.getResources("classpath:org/aopalliance/**/*.class");
assertProtocolAndFilenames(resources, "jar", CLASSES_IN_AOPALLIANCE); assertProtocolAndFilenames(resources, "jar", CLASSES_IN_AOPALLIANCE);
} }
@Test
public void testClasspathStartWithPatternInJar() throws IOException { public void testClasspathStartWithPatternInJar() throws IOException {
Resource[] resources = resolver.getResources("classpath*:org/aopalliance/**/*.class"); Resource[] resources = resolver.getResources("classpath*:org/aopalliance/**/*.class");
assertProtocolAndFilenames(resources, "jar", CLASSES_IN_AOPALLIANCE); assertProtocolAndFilenames(resources, "jar", CLASSES_IN_AOPALLIANCE);

View File

@ -80,13 +80,13 @@ public class JmxUtilsTests extends TestCase {
} }
public void testGetAttributeNameWithStrictCasing() { public void testGetAttributeNameWithStrictCasing() {
PropertyDescriptor pd = new BeanWrapperImpl(AttributeTest.class).getPropertyDescriptor("name"); PropertyDescriptor pd = new BeanWrapperImpl(AttributeTestBean.class).getPropertyDescriptor("name");
String attributeName = JmxUtils.getAttributeName(pd, true); String attributeName = JmxUtils.getAttributeName(pd, true);
assertEquals("Incorrect casing on attribute name", "Name", attributeName); assertEquals("Incorrect casing on attribute name", "Name", attributeName);
} }
public void testGetAttributeNameWithoutStrictCasing() { public void testGetAttributeNameWithoutStrictCasing() {
PropertyDescriptor pd = new BeanWrapperImpl(AttributeTest.class).getPropertyDescriptor("name"); PropertyDescriptor pd = new BeanWrapperImpl(AttributeTestBean.class).getPropertyDescriptor("name");
String attributeName = JmxUtils.getAttributeName(pd, false); String attributeName = JmxUtils.getAttributeName(pd, false);
assertEquals("Incorrect casing on attribute name", "name", attributeName); assertEquals("Incorrect casing on attribute name", "name", attributeName);
} }
@ -121,17 +121,17 @@ public class JmxUtilsTests extends TestCase {
public void testIsMBean() { public void testIsMBean() {
// Correctly returns true for a class // Correctly returns true for a class
assertTrue(JmxUtils.isMBean(JmxClassTest.class)); assertTrue(JmxUtils.isMBean(JmxClass.class));
// Correctly returns false since JmxUtils won't navigate to the extended interface // Correctly returns false since JmxUtils won't navigate to the extended interface
assertFalse(JmxUtils.isMBean(SpecializedJmxInterfaceTest.class)); assertFalse(JmxUtils.isMBean(SpecializedJmxInterface.class));
// Incorrectly returns true since it doesn't detect that this is an interface // Incorrectly returns true since it doesn't detect that this is an interface
assertFalse(JmxUtils.isMBean(JmxInterfaceTest.class)); assertFalse(JmxUtils.isMBean(JmxInterface.class));
} }
public static class AttributeTest { public static class AttributeTestBean {
private String name; private String name;
@ -216,27 +216,27 @@ public class JmxUtilsTests extends TestCase {
} }
private static interface JmxInterfaceTestMBean { private static interface JmxInterfaceMBean {
} }
private static interface JmxInterfaceTest extends JmxInterfaceTestMBean { private static interface JmxInterface extends JmxInterfaceMBean {
} }
private static interface SpecializedJmxInterfaceTest extends JmxInterfaceTest { private static interface SpecializedJmxInterface extends JmxInterface {
} }
private static interface JmxClassTestMBean { private static interface JmxClassMBean {
} }
private static class JmxClassTest implements JmxClassTestMBean { private static class JmxClass implements JmxClassMBean {
} }

View File

@ -111,15 +111,15 @@ public class TestContextManagerTests {
@Before @Before
public void setUpTestContextManager() throws Throwable { public void setUpTestContextManager() throws Throwable {
final Method testMethod = ExampleTest.class.getDeclaredMethod("exampleTestMethod", (Class<?>[]) null); final Method testMethod = ExampleTestCase.class.getDeclaredMethod("exampleTestMethod", (Class<?>[]) null);
this.testContextManager = new TestContextManager(ExampleTest.class); this.testContextManager = new TestContextManager(ExampleTestCase.class);
this.testContextManager.registerTestExecutionListeners(new NamedTestExecutionListener(FIRST), this.testContextManager.registerTestExecutionListeners(new NamedTestExecutionListener(FIRST),
new NamedTestExecutionListener(SECOND), new NamedTestExecutionListener(THIRD)); new NamedTestExecutionListener(SECOND), new NamedTestExecutionListener(THIRD));
assertEquals("Verifying the number of registered TestExecutionListeners.", 6, assertEquals("Verifying the number of registered TestExecutionListeners.", 6,
this.testContextManager.getTestExecutionListeners().size()); this.testContextManager.getTestExecutionListeners().size());
this.testContextManager.beforeTestMethod(new ExampleTest(), testMethod); this.testContextManager.beforeTestMethod(new ExampleTestCase(), testMethod);
} }
/** /**
@ -135,14 +135,14 @@ public class TestContextManagerTests {
@After @After
public void tearDownTestContextManager() throws Throwable { public void tearDownTestContextManager() throws Throwable {
final Method testMethod = ExampleTest.class.getDeclaredMethod("exampleTestMethod", (Class<?>[]) null); final Method testMethod = ExampleTestCase.class.getDeclaredMethod("exampleTestMethod", (Class<?>[]) null);
this.testContextManager.afterTestMethod(new ExampleTest(), testMethod, null); this.testContextManager.afterTestMethod(new ExampleTestCase(), testMethod, null);
this.testContextManager = null; this.testContextManager = null;
} }
@ContextConfiguration @ContextConfiguration
private static class ExampleTest { private static class ExampleTestCase {
public void exampleTestMethod() { public void exampleTestMethod() {
assertTrue(true); assertTrue(true);

View File

@ -17,6 +17,7 @@
package org.springframework.test.context; package org.springframework.test.context;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Test; import org.junit.Test;
@ -43,14 +44,14 @@ public class TestExecutionListenersTests {
@Test @Test
public void verifyNumDefaultListenersRegistered() throws Exception { public void verifyNumDefaultListenersRegistered() throws Exception {
TestContextManager testContextManager = new TestContextManager(DefaultListenersExampleTest.class); TestContextManager testContextManager = new TestContextManager(DefaultListenersExampleTestCase.class);
assertEquals("Verifying the number of registered TestExecutionListeners for DefaultListenersExampleTest.", 3, assertEquals("Verifying the number of registered TestExecutionListeners for DefaultListenersExampleTest.", 3,
testContextManager.getTestExecutionListeners().size()); testContextManager.getTestExecutionListeners().size());
} }
@Test @Test
public void verifyNumNonInheritedDefaultListenersRegistered() throws Exception { public void verifyNumNonInheritedDefaultListenersRegistered() throws Exception {
TestContextManager testContextManager = new TestContextManager(NonInheritedDefaultListenersExampleTest.class); TestContextManager testContextManager = new TestContextManager(NonInheritedDefaultListenersExampleTestCase.class);
assertEquals( assertEquals(
"Verifying the number of registered TestExecutionListeners for NonInheritedDefaultListenersExampleTest.", "Verifying the number of registered TestExecutionListeners for NonInheritedDefaultListenersExampleTest.",
1, testContextManager.getTestExecutionListeners().size()); 1, testContextManager.getTestExecutionListeners().size());
@ -58,17 +59,17 @@ public class TestExecutionListenersTests {
@Test @Test
public void verifyNumInheritedDefaultListenersRegistered() throws Exception { public void verifyNumInheritedDefaultListenersRegistered() throws Exception {
TestContextManager testContextManager = new TestContextManager(InheritedDefaultListenersExampleTest.class); TestContextManager testContextManager = new TestContextManager(InheritedDefaultListenersExampleTestCase.class);
assertEquals( assertEquals(
"Verifying the number of registered TestExecutionListeners for InheritedDefaultListenersExampleTest.", "Verifying the number of registered TestExecutionListeners for InheritedDefaultListenersExampleTest.",
1, testContextManager.getTestExecutionListeners().size()); 1, testContextManager.getTestExecutionListeners().size());
testContextManager = new TestContextManager(SubInheritedDefaultListenersExampleTest.class); testContextManager = new TestContextManager(SubInheritedDefaultListenersExampleTestCase.class);
assertEquals( assertEquals(
"Verifying the number of registered TestExecutionListeners for SubInheritedDefaultListenersExampleTest.", "Verifying the number of registered TestExecutionListeners for SubInheritedDefaultListenersExampleTest.",
1, testContextManager.getTestExecutionListeners().size()); 1, testContextManager.getTestExecutionListeners().size());
testContextManager = new TestContextManager(SubSubInheritedDefaultListenersExampleTest.class); testContextManager = new TestContextManager(SubSubInheritedDefaultListenersExampleTestCase.class);
assertEquals( assertEquals(
"Verifying the number of registered TestExecutionListeners for SubSubInheritedDefaultListenersExampleTest.", "Verifying the number of registered TestExecutionListeners for SubSubInheritedDefaultListenersExampleTest.",
2, testContextManager.getTestExecutionListeners().size()); 2, testContextManager.getTestExecutionListeners().size());
@ -76,55 +77,58 @@ public class TestExecutionListenersTests {
@Test @Test
public void verifyNumListenersRegistered() throws Exception { public void verifyNumListenersRegistered() throws Exception {
TestContextManager testContextManager = new TestContextManager(ExampleTest.class); TestContextManager testContextManager = new TestContextManager(ExampleTestCase.class);
assertEquals("Verifying the number of registered TestExecutionListeners for ExampleTest.", 3, assertEquals("Verifying the number of registered TestExecutionListeners for ExampleTest.", 3,
testContextManager.getTestExecutionListeners().size()); testContextManager.getTestExecutionListeners().size());
} }
@Test @Test
public void verifyNumNonInheritedListenersRegistered() throws Exception { public void verifyNumNonInheritedListenersRegistered() throws Exception {
TestContextManager testContextManager = new TestContextManager(NonInheritedListenersExampleTest.class); TestContextManager testContextManager = new TestContextManager(NonInheritedListenersExampleTestCase.class);
assertEquals("Verifying the number of registered TestExecutionListeners for NonInheritedListenersExampleTest.", assertEquals("Verifying the number of registered TestExecutionListeners for NonInheritedListenersExampleTest.",
1, testContextManager.getTestExecutionListeners().size()); 1, testContextManager.getTestExecutionListeners().size());
} }
@Test @Test
public void verifyNumInheritedListenersRegistered() throws Exception { public void verifyNumInheritedListenersRegistered() throws Exception {
TestContextManager testContextManager = new TestContextManager(InheritedListenersExampleTest.class); TestContextManager testContextManager = new TestContextManager(InheritedListenersExampleTestCase.class);
assertEquals("Verifying the number of registered TestExecutionListeners for InheritedListenersExampleTest.", 4, assertEquals("Verifying the number of registered TestExecutionListeners for InheritedListenersExampleTest.", 4,
testContextManager.getTestExecutionListeners().size()); testContextManager.getTestExecutionListeners().size());
} }
static class DefaultListenersExampleTest { static class DefaultListenersExampleTestCase {
} }
@TestExecutionListeners( { QuuxTestExecutionListener.class }) @TestExecutionListeners( { QuuxTestExecutionListener.class })
static class InheritedDefaultListenersExampleTest extends DefaultListenersExampleTest { static class InheritedDefaultListenersExampleTestCase extends DefaultListenersExampleTestCase {
public void testDoSomething() {
fail("whaa?");
}
} }
static class SubInheritedDefaultListenersExampleTest extends InheritedDefaultListenersExampleTest { static class SubInheritedDefaultListenersExampleTestCase extends InheritedDefaultListenersExampleTestCase {
} }
@TestExecutionListeners( { EnigmaTestExecutionListener.class }) @TestExecutionListeners( { EnigmaTestExecutionListener.class })
static class SubSubInheritedDefaultListenersExampleTest extends SubInheritedDefaultListenersExampleTest { static class SubSubInheritedDefaultListenersExampleTestCase extends SubInheritedDefaultListenersExampleTestCase {
} }
@TestExecutionListeners(value = { QuuxTestExecutionListener.class }, inheritListeners = false) @TestExecutionListeners(value = { QuuxTestExecutionListener.class }, inheritListeners = false)
static class NonInheritedDefaultListenersExampleTest extends InheritedDefaultListenersExampleTest { static class NonInheritedDefaultListenersExampleTestCase extends InheritedDefaultListenersExampleTestCase {
} }
@TestExecutionListeners( { FooTestExecutionListener.class, BarTestExecutionListener.class, @TestExecutionListeners( { FooTestExecutionListener.class, BarTestExecutionListener.class,
BazTestExecutionListener.class }) BazTestExecutionListener.class })
static class ExampleTest { static class ExampleTestCase {
} }
@TestExecutionListeners( { QuuxTestExecutionListener.class }) @TestExecutionListeners( { QuuxTestExecutionListener.class })
static class InheritedListenersExampleTest extends ExampleTest { static class InheritedListenersExampleTestCase extends ExampleTestCase {
} }
@TestExecutionListeners(value = { QuuxTestExecutionListener.class }, inheritListeners = false) @TestExecutionListeners(value = { QuuxTestExecutionListener.class }, inheritListeners = false)
static class NonInheritedListenersExampleTest extends InheritedListenersExampleTest { static class NonInheritedListenersExampleTestCase extends InheritedListenersExampleTestCase {
} }
static class FooTestExecutionListener extends AbstractTestExecutionListener { static class FooTestExecutionListener extends AbstractTestExecutionListener {

View File

@ -63,49 +63,49 @@ public class GenericXmlContextLoaderResourceLocationsTests {
@Parameters @Parameters
public static Collection<Object[]> contextConfigurationLocationsData() { public static Collection<Object[]> contextConfigurationLocationsData() {
@ContextConfiguration @ContextConfiguration
class ClasspathDefaultLocationsTest { class ClasspathDefaultLocationsTestCase {
} }
@ContextConfiguration(locations = { "context1.xml", "context2.xml" }) @ContextConfiguration(locations = { "context1.xml", "context2.xml" })
class ImplicitClasspathLocationsTest { class ImplicitClasspathLocationsTestCase {
} }
@ContextConfiguration(locations = { "classpath:context.xml" }) @ContextConfiguration(locations = { "classpath:context.xml" })
class ExplicitClasspathLocationsTest { class ExplicitClasspathLocationsTestCase {
} }
@ContextConfiguration(locations = { "file:/testing/directory/context.xml" }) @ContextConfiguration(locations = { "file:/testing/directory/context.xml" })
class ExplicitFileLocationsTest { class ExplicitFileLocationsTestCase {
} }
@ContextConfiguration(locations = { "http://example.com/context.xml" }) @ContextConfiguration(locations = { "http://example.com/context.xml" })
class ExplicitUrlLocationsTest { class ExplicitUrlLocationsTestCase {
} }
@ContextConfiguration(locations = { "context1.xml", "classpath:context2.xml", "/context3.xml", @ContextConfiguration(locations = { "context1.xml", "classpath:context2.xml", "/context3.xml",
"file:/testing/directory/context.xml", "http://example.com/context.xml" }) "file:/testing/directory/context.xml", "http://example.com/context.xml" })
class ExplicitMixedPathTypesLocationsTest { class ExplicitMixedPathTypesLocationsTestCase {
} }
return Arrays.asList(new Object[][] { return Arrays.asList(new Object[][] {
{ {
ClasspathDefaultLocationsTest.class, ClasspathDefaultLocationsTestCase.class,
new String[] { "classpath:/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests$1ClasspathDefaultLocationsTest-context.xml" } }, new String[] { "classpath:/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests$1ClasspathDefaultLocationsTestCase-context.xml" } },
{ {
ImplicitClasspathLocationsTest.class, ImplicitClasspathLocationsTestCase.class,
new String[] { "classpath:/org/springframework/test/context/support/context1.xml", new String[] { "classpath:/org/springframework/test/context/support/context1.xml",
"classpath:/org/springframework/test/context/support/context2.xml" } }, "classpath:/org/springframework/test/context/support/context2.xml" } },
{ ExplicitClasspathLocationsTest.class, new String[] { "classpath:context.xml" } }, { ExplicitClasspathLocationsTestCase.class, new String[] { "classpath:context.xml" } },
{ ExplicitFileLocationsTest.class, new String[] { "file:/testing/directory/context.xml" } }, { ExplicitFileLocationsTestCase.class, new String[] { "file:/testing/directory/context.xml" } },
{ ExplicitUrlLocationsTest.class, new String[] { "http://example.com/context.xml" } }, { ExplicitUrlLocationsTestCase.class, new String[] { "http://example.com/context.xml" } },
{ {
ExplicitMixedPathTypesLocationsTest.class, ExplicitMixedPathTypesLocationsTestCase.class,
new String[] { "classpath:/org/springframework/test/context/support/context1.xml", new String[] { "classpath:/org/springframework/test/context/support/context1.xml",
"classpath:context2.xml", "classpath:/context3.xml", "file:/testing/directory/context.xml", "classpath:context2.xml", "classpath:/context3.xml", "file:/testing/directory/context.xml",
"http://example.com/context.xml" } } "http://example.com/context.xml" } }
@ -114,7 +114,6 @@ public class GenericXmlContextLoaderResourceLocationsTests {
} }
@Test @Test
@SuppressWarnings("unchecked")
public void assertContextConfigurationLocations() throws Exception { public void assertContextConfigurationLocations() throws Exception {
final ContextConfiguration contextConfig = this.testClass.getAnnotation(ContextConfiguration.class); final ContextConfiguration contextConfig = this.testClass.getAnnotation(ContextConfiguration.class);

View File

@ -26,6 +26,7 @@ import static org.testng.Assert.assertTrue;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.junit.Ignore;
import org.springframework.beans.Employee; import org.springframework.beans.Employee;
import org.springframework.beans.Pet; import org.springframework.beans.Pet;
import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.BeanNameAware;
@ -51,8 +52,9 @@ import org.testng.annotations.Test;
* @author Sam Brannen * @author Sam Brannen
* @since 2.5 * @since 2.5
*/ */
@Ignore // renamed to Tests_ to avoid being picked up by junit. Spring Build support for TestNG is pending.
@ContextConfiguration @ContextConfiguration
public class ConcreteTransactionalTestNGSpringContextTests extends AbstractTransactionalTestNGSpringContextTests public class ConcreteTransactionalTestNGSpringContextTests_ extends AbstractTransactionalTestNGSpringContextTests
implements BeanNameAware, InitializingBean { implements BeanNameAware, InitializingBean {
// ------------------------------------------------------------------------| // ------------------------------------------------------------------------|

View File

@ -21,6 +21,7 @@ import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNotSame; import static org.testng.Assert.assertNotSame;
import static org.testng.Assert.assertSame; import static org.testng.Assert.assertSame;
import org.junit.Ignore;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
@ -47,8 +48,9 @@ import org.testng.annotations.Test;
* @author Sam Brannen * @author Sam Brannen
* @since 2.5 * @since 2.5
*/ */
@Ignore // renamed to Tests_ to avoid being picked up by junit. Spring Build support for TestNG is pending.
@ContextConfiguration @ContextConfiguration
public class DirtiesContextTransactionalTestNGSpringContextTests extends AbstractTransactionalTestNGSpringContextTests { public class DirtiesContextTransactionalTestNGSpringContextTests_ extends AbstractTransactionalTestNGSpringContextTests {
private ApplicationContext dirtiedApplicationContext; private ApplicationContext dirtiedApplicationContext;