+ updated petclinic dependency metadata from junit 4.4->4.5; servlet 2.4->2.5
+ deprecated AssertThrows (slated for complete removal by 3.0 GA)
This commit is contained in:
parent
986bb1995d
commit
685f2fbc1c
|
|
@ -31,29 +31,27 @@ import java.rmi.RemoteException;
|
||||||
import javax.transaction.TransactionRolledbackException;
|
import javax.transaction.TransactionRolledbackException;
|
||||||
|
|
||||||
import org.aopalliance.intercept.MethodInvocation;
|
import org.aopalliance.intercept.MethodInvocation;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.aop.ThrowsAdvice;
|
import org.springframework.aop.ThrowsAdvice;
|
||||||
import org.springframework.aop.framework.MethodCounter;
|
import org.springframework.aop.framework.MethodCounter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Unit tests for {@link ThrowsAdviceInterceptor}
|
||||||
|
*
|
||||||
* @author Rod Johnson
|
* @author Rod Johnson
|
||||||
* @author Chris Beams
|
* @author Chris Beams
|
||||||
*/
|
*/
|
||||||
public class ThrowsAdviceInterceptorTests {
|
public class ThrowsAdviceInterceptorTests {
|
||||||
|
|
||||||
@Test
|
@Test(expected=IllegalArgumentException.class)
|
||||||
public void testNoHandlerMethods() {
|
public void testNoHandlerMethods() {
|
||||||
Object o = new Object();
|
// should require one handler method at least
|
||||||
try {
|
new ThrowsAdviceInterceptor(new Object());
|
||||||
new ThrowsAdviceInterceptor(o);
|
|
||||||
fail("Should require one handler method at least");
|
|
||||||
}
|
|
||||||
catch (IllegalArgumentException ex) {
|
|
||||||
// Ok
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Ignore
|
||||||
public void testNotInvoked() throws Throwable {
|
public void testNotInvoked() throws Throwable {
|
||||||
MyThrowsHandler th = new MyThrowsHandler();
|
MyThrowsHandler th = new MyThrowsHandler();
|
||||||
ThrowsAdviceInterceptor ti = new ThrowsAdviceInterceptor(th);
|
ThrowsAdviceInterceptor ti = new ThrowsAdviceInterceptor(th);
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,15 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.test"/>
|
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.test"/>
|
||||||
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-4.4.0.jar"
|
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.5.0/com.springsource.org.junit-4.5.0.jar"
|
||||||
sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar"/>
|
sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.5.0/com.springsource.org.junit-sources-4.5.0.jar"/>
|
||||||
|
<classpathentry kind="var" path="IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa/1.0.2/com.springsource.org.apache.openjpa-1.0.2.jar" sourcepath="/IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa/1.0.2/com.springsource.org.apache.openjpa-sources-1.0.2.jar"/>
|
||||||
|
<classpathentry kind="var" path="IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.lib/1.0.2/com.springsource.org.apache.openjpa.lib-1.0.2.jar" sourcepath="/IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.lib/1.0.2/com.springsource.org.apache.openjpa.lib-sources-1.0.2.jar"/>
|
||||||
|
<classpathentry kind="var" path="IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.persistence/1.0.2/com.springsource.org.apache.openjpa.persistence-1.0.2.jar" sourcepath="/IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.persistence/1.0.2/com.springsource.org.apache.openjpa.persistence-sources-1.0.2.jar"/>
|
||||||
|
<classpathentry kind="var" path="IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.java5/1.0.2/com.springsource.org.apache.openjpa.java5-1.0.2.jar" sourcepath="/IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.java5/1.0.2/com.springsource.org.apache.openjpa.java5-sources-1.0.2.jar"/>
|
||||||
|
<classpathentry kind="var" path="IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.jdbc/1.0.2/com.springsource.org.apache.openjpa.jdbc-1.0.2.jar" sourcepath="/IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.jdbc/1.0.2/com.springsource.org.apache.openjpa.jdbc-sources-1.0.2.jar"/>
|
||||||
|
<classpathentry kind="var" path="IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.jdbc.java5/1.0.2/com.springsource.org.apache.openjpa.jdbc.java5-1.0.2.jar" sourcepath="/IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.jdbc.java5/1.0.2/com.springsource.org.apache.openjpa.jdbc.java5-sources-1.0.2.jar"/>
|
||||||
|
<classpathentry kind="var" path="IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.lib.java5/1.0.2/com.springsource.org.apache.openjpa.lib.java5-1.0.2.jar" sourcepath="/IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.lib.java5/1.0.2/com.springsource.org.apache.openjpa.lib.java5-sources-1.0.2.jar"/>
|
||||||
|
<classpathentry kind="var" path="IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.persistence.jdbc/1.0.2/com.springsource.org.apache.openjpa.persistence.jdbc-1.0.2.jar" sourcepath="/IVY_CACHE/org.apache.openjpa/com.springsource.org.apache.openjpa.persistence.jdbc/1.0.2/com.springsource.org.apache.openjpa.persistence.jdbc-sources-1.0.2.jar"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</publications>
|
</publications>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.4.0" conf="provided->runtime"/>
|
<dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.5.0" conf="provided->runtime"/>
|
||||||
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.1.2" conf="compile->runtime"/>
|
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.1.2" conf="compile->runtime"/>
|
||||||
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile->compile"/>
|
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile->compile"/>
|
||||||
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.dbcp" rev="1.2.2.osgi" conf="compile->runtime"/>
|
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.dbcp" rev="1.2.2.osgi" conf="compile->runtime"/>
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.jdbc.java5" rev="1.0.2" conf="compile->compile"/>
|
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.jdbc.java5" rev="1.0.2" conf="compile->compile"/>
|
||||||
<dependency org="com.oracle.toplink.essentials" name="com.springsource.oracle.toplink.essentials" rev="2.0.0.b41-beta2" conf="compile->compile"/>
|
<dependency org="com.oracle.toplink.essentials" name="com.springsource.oracle.toplink.essentials" rev="2.0.0.b41-beta2" conf="compile->compile"/>
|
||||||
<!-- test dependencies -->
|
<!-- test dependencies -->
|
||||||
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.4.0" conf="test->compile" />
|
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.5.0" conf="test->compile" />
|
||||||
<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"/>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,9 @@ package org.springframework.test;
|
||||||
* @author Rick Evans
|
* @author Rick Evans
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
|
* @deprecated favor use of JUnit 4's {@code @Test(expected=...)} support
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public abstract class AssertThrows {
|
public abstract class AssertThrows {
|
||||||
|
|
||||||
private final Class expectedException;
|
private final Class expectedException;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue