+ 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)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@466 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Chris Beams
2008-12-18 18:32:05 +00:00
parent 3223775046
commit 410e80fe3c
4 changed files with 21 additions and 13 deletions
@@ -31,29 +31,27 @@ import java.rmi.RemoteException;
import javax.transaction.TransactionRolledbackException;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.aop.ThrowsAdvice;
import org.springframework.aop.framework.MethodCounter;
/**
* Unit tests for {@link ThrowsAdviceInterceptor}
*
* @author Rod Johnson
* @author Chris Beams
*/
public class ThrowsAdviceInterceptorTests {
@Test
@Test(expected=IllegalArgumentException.class)
public void testNoHandlerMethods() {
Object o = new Object();
try {
new ThrowsAdviceInterceptor(o);
fail("Should require one handler method at least");
}
catch (IllegalArgumentException ex) {
// Ok
}
// should require one handler method at least
new ThrowsAdviceInterceptor(new Object());
}
@Test
@Ignore
public void testNotInvoked() throws Throwable {
MyThrowsHandler th = new MyThrowsHandler();
ThrowsAdviceInterceptor ti = new ThrowsAdviceInterceptor(th);