Author: nickarls
Date: 2009-12-08 17:27:47 -0500 (Tue, 08 Dec 2009)
New Revision: 5235
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java
Log:
WBRI-326
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java 2009-12-08
22:19:27 UTC (rev 5234)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java 2009-12-08
22:27:47 UTC (rev 5235)
@@ -1,5 +1,7 @@
package org.jboss.weld.tests.enterprise;
+import javax.ejb.EJBException;
+
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
@@ -19,6 +21,23 @@
}
+ @Test(description="WBRI-326")
+ public void testInvocationExceptionIsUnwrapped()
+ {
+ try
+ {
+ getCurrentManager().getInstanceByType(Fedora.class).causeRuntimeException();
+ }
+ catch (Throwable t)
+ {
+ if (t instanceof EJBException && t.getCause() instanceof
BowlerHatException)
+ {
+ return;
+ }
+ }
+ assert false : "Expected a BowlerHatException to be thrown";
+ }
+
@Test(description="WBRI-275")
public void testSLSBBusinessMethodThrowsRuntimeException()
{
Show replies by date