You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sc...@apache.org on 2008/09/16 23:03:28 UTC

svn commit: r696057 - /tuscany/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java

Author: scottkurz
Date: Tue Sep 16 14:03:28 2008
New Revision: 696057

URL: http://svn.apache.org/viewvc?rev=696057&view=rev
Log:
Account for possibility of binding impl wrappering exc in ServiceRuntimeExc

Modified:
    tuscany/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java

Modified: tuscany/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java?rev=696057&r1=696056&r2=696057&view=diff
==============================================================================
--- tuscany/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java (original)
+++ tuscany/java/sca/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java Tue Sep 16 14:03:28 2008
@@ -26,6 +26,8 @@
 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 @@
             a.illegalCast();
         } catch (IllegalArgumentException iae) {
             check = "IllegalCast";
+        } catch (ServiceRuntimeException sre) {
+            if (sre.getCause() instanceof IllegalArgumentException) { 
+                check = "IllegalCast";
+            }
         }
         Assert.assertEquals("IllegalCast", check);
     }