From 685f2fbc1c6aaf54e33a4585b122c71a1f2f0416 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Thu, 18 Dec 2008 18:32:05 +0000 Subject: [PATCH] + 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) --- .../adapter/ThrowsAdviceInterceptorTests.java | 16 +++++++--------- org.springframework.samples.petclinic/.classpath | 12 ++++++++++-- org.springframework.samples.petclinic/ivy.xml | 4 ++-- .../org/springframework/test/AssertThrows.java | 2 ++ 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/org.springframework.aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java b/org.springframework.aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java index 81813d2cd8f..fa9499fe5f7 100644 --- a/org.springframework.aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java +++ b/org.springframework.aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java @@ -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); diff --git a/org.springframework.samples.petclinic/.classpath b/org.springframework.samples.petclinic/.classpath index da92498c87c..6c433c6312f 100644 --- a/org.springframework.samples.petclinic/.classpath +++ b/org.springframework.samples.petclinic/.classpath @@ -7,7 +7,15 @@ - + + + + + + + + + diff --git a/org.springframework.samples.petclinic/ivy.xml b/org.springframework.samples.petclinic/ivy.xml index da863e5322c..dbab588ebd3 100644 --- a/org.springframework.samples.petclinic/ivy.xml +++ b/org.springframework.samples.petclinic/ivy.xml @@ -19,7 +19,7 @@ - + @@ -45,7 +45,7 @@ - + diff --git a/org.springframework.test/src/main/java/org/springframework/test/AssertThrows.java b/org.springframework.test/src/main/java/org/springframework/test/AssertThrows.java index 4be59459f39..164dc9a58f2 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/AssertThrows.java +++ b/org.springframework.test/src/main/java/org/springframework/test/AssertThrows.java @@ -81,7 +81,9 @@ package org.springframework.test; * @author Rick Evans * @author Juergen Hoeller * @since 2.0 + * @deprecated favor use of JUnit 4's {@code @Test(expected=...)} support */ +@Deprecated public abstract class AssertThrows { private final Class expectedException;