+ 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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user