From 23d01fe125460c23ac180505d5aa1518a28dc0a0 Mon Sep 17 00:00:00 2001 From: scottkurz Date: Tue, 16 Sep 2008 21:03:28 +0000 Subject: Account for possibility of binding impl wrappering exc in ServiceRuntimeExc git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696057 13f79535-47bb-0310-9956-ffa450edef68 --- .../javaapi/apis/componentcontext/ComponentContextTestCase.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'java/sca/vtest/java-api') diff --git a/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java b/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java index 9bfe0c06e7..4e05aa2252 100644 --- a/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java +++ b/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java @@ -26,6 +26,8 @@ import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; +import org.osoa.sca.ServiceRuntimeException; + /** * This test class tests the ComponentContext interface described in 1.7.1 of * the SCA Java Annotations & APIs Specification 1.0. Relevant sections of 1.4 @@ -164,6 +166,10 @@ public class ComponentContextTestCase { a.illegalCast(); } catch (IllegalArgumentException iae) { check = "IllegalCast"; + } catch (ServiceRuntimeException sre) { + if (sre.getCause() instanceof IllegalArgumentException) { + check = "IllegalCast"; + } } Assert.assertEquals("IllegalCast", check); } -- cgit v1.2.3