+ 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:
Chris Beams
2008-12-18 18:32:05 +00:00
parent 986bb1995d
commit 685f2fbc1c
4 changed files with 21 additions and 13 deletions

View File

@@ -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);