diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-08 09:32:53 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-08 09:32:53 +0000 |
commit | c9ca2d6c3bf93ec7b24775b2ccf0a76a04816aef (patch) | |
tree | 4426d0df1afa41d6e590c14ec091f4b94923d942 /branches/sca-java-1.x/itest/jms/src/test/java/org/apache | |
parent | cce88ac3a45204d75b3d9f378f7266547ba13f2c (diff) |
Add more exception testing for TUSCANY-2593
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@732663 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/itest/jms/src/test/java/org/apache')
-rw-r--r-- | branches/sca-java-1.x/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/branches/sca-java-1.x/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java b/branches/sca-java-1.x/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java index ba3e697e13..22ebe9afcf 100644 --- a/branches/sca-java-1.x/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java +++ b/branches/sca-java-1.x/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java @@ -19,12 +19,12 @@ package org.apache.tuscany.sca.binding.jms; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import org.apache.tuscany.sca.host.embedded.SCADomain; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; /** @@ -41,7 +41,7 @@ public class ExceptionsTestCase { } @Test - @Ignore // TUSCANY-2593, currently fails for some jaxws reason? +// @Ignore // TUSCANY-2593, currently fails for some jaxws reason? public void testChecked() { ExceptionService service = scaDomain.getService(ExceptionService.class, "ExceptionServiceClient"); try { @@ -53,6 +53,42 @@ public class ExceptionsTestCase { } @Test + public void testCheckedNoArgs() { + ExceptionService service = scaDomain.getService(ExceptionService.class, "ExceptionServiceClient"); + try { + service.throwCheckedNoArgs(); + fail(); + } catch (CheckedExcpetionNoArgs e) { + // ok + } + } + + @Test + public void testChecked2Args() { + ExceptionService service = scaDomain.getService(ExceptionService.class, "ExceptionServiceClient"); + try { + service.throwChecked2Args(); + fail(); + } catch (CheckedExcpetion2Args e) { + assertEquals("foo", e.getMessage()); + assertNotNull(e.getCause()); + assertEquals("bla", e.getCause().getMessage()); + } + } + + @Test + public void testCheckedChained() { + ExceptionService service = scaDomain.getService(ExceptionService.class, "ExceptionServiceClient"); + try { + service.throwCheckedChained(); + fail(); + } catch (CheckedExcpetionChained e) { + assertNotNull(e.getCause()); + assertEquals("bla", e.getCause().getMessage()); + } + } + + @Test public void testUnChecked() { ExceptionService service = scaDomain.getService(ExceptionService.class, "ExceptionServiceClient"); try { |