getCause is 1.4 specific. Have replaced with getException.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137114 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2002-11-06 19:14:43 +00:00
parent 80f68cc0c4
commit 27c8d12495
1 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@
* Test cases for the {@link Enum} class.
*
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
* @version $Id: EnumTest.java,v 1.3 2002/11/02 13:17:06 scolebourne Exp $
* @version $Id: EnumTest.java,v 1.4 2002/11/06 19:14:43 bayard Exp $
*/
public final class EnumTest extends TestCase {
@ -160,7 +160,7 @@ public void testBroken1() {
Broken1Enum.RED.getName();
fail();
} catch (ExceptionInInitializerError ex) {
assertTrue(ex.getCause() instanceof IllegalArgumentException);
assertTrue(ex.getException() instanceof IllegalArgumentException);
}
}
@ -169,7 +169,7 @@ public void testBroken2() {
Broken2Enum.RED.getName();
fail();
} catch (ExceptionInInitializerError ex) {
assertTrue(ex.getCause() instanceof IllegalArgumentException);
assertTrue(ex.getException() instanceof IllegalArgumentException);
}
}
@ -178,7 +178,7 @@ public void testBroken3() {
Broken3Enum.RED.getName();
fail();
} catch (ExceptionInInitializerError ex) {
assertTrue(ex.getCause() instanceof IllegalArgumentException);
assertTrue(ex.getException() instanceof IllegalArgumentException);
}
}