tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1178824 - /openejb/trunk/openejb/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/CxfJaxWsProviderTest.java
Date Tue, 04 Oct 2011 14:59:56 GMT
Author: rmannibucau
Date: Tue Oct  4 14:59:56 2011
New Revision: 1178824

URL: http://svn.apache.org/viewvc?rev=1178824&view=rev
Log:
printing errors if cxf test fails

Modified:
    openejb/trunk/openejb/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/CxfJaxWsProviderTest.java

Modified: openejb/trunk/openejb/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/CxfJaxWsProviderTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/CxfJaxWsProviderTest.java?rev=1178824&r1=1178823&r2=1178824&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/CxfJaxWsProviderTest.java
(original)
+++ openejb/trunk/openejb/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/CxfJaxWsProviderTest.java
Tue Oct  4 14:59:56 2011
@@ -40,84 +40,90 @@ public class CxfJaxWsProviderTest extend
     private InitialContext initialContext;
 
     protected void setUp() throws Exception {
-	Properties properties = new Properties();
-	properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
-	properties.setProperty("openejb.embedded.remotable", "true");
+        Properties properties = new Properties();
+        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+        properties.setProperty("openejb.embedded.remotable", "true");
 
-	initialContext = new InitialContext(properties);
+        initialContext = new InitialContext(properties);
     }
     //END SNIPPET: setup    
 
     public void test00_runCheckedException() {
-	try {
-	    AuthenticatorService withHandler = Service.create(
-		    new URL("http://localhost:4204/AuthenticatorServiceBean?wsdl"), 
-		    new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanService"))
-		    .getPort(AuthenticatorService.class);
-	    assertNotNull(withHandler);
-
-	    AuthenticatorService noHandler = Service.create(
-		    new URL("http://localhost:4204/AuthenticatorServiceBeanNoHandler?wsdl"), 
-		    new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanNoHandlerService"))
-		    .getPort(AuthenticatorService.class);
-	    assertNotNull(noHandler);
-
-	    try {
-		withHandler.authenticate("John", "Doe");
-	    } catch (WrongPasswordException e) {
-		System.out.println("My lovely checked exception...");
-	    } catch (Throwable e) {
-		fail("A throwable instead of a checked exception...");
-	    }
-
-	    try {
-		noHandler.authenticate("John", "Doe");
-	    } catch (WrongPasswordException e) {
-		System.out.println("My lovely checked exception...");
-	    } catch (Throwable e) {
-		fail("A throwable instead of a checked exception...");
-	    }
-
-	} catch (MalformedURLException e) {
-	    fail("?!? invalid URL ???");
-	}
+        try {
+            AuthenticatorService withHandler = Service.create(
+                new URL("http://localhost:4204/AuthenticatorServiceBean?wsdl"),
+                new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanService"))
+                .getPort(AuthenticatorService.class);
+            assertNotNull(withHandler);
+
+            AuthenticatorService noHandler = Service.create(
+                new URL("http://localhost:4204/AuthenticatorServiceBeanNoHandler?wsdl"),
+                new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanNoHandlerService"))
+                .getPort(AuthenticatorService.class);
+            assertNotNull(noHandler);
+
+            try {
+                withHandler.authenticate("John", "Doe");
+            } catch (WrongPasswordException e) {
+                System.out.println("My lovely checked exception...");
+            } catch (Throwable e) {
+                e.printStackTrace();
+                fail("A throwable instead of a checked exception...");
+            }
+
+            try {
+                noHandler.authenticate("John", "Doe");
+            } catch (WrongPasswordException e) {
+                System.out.println("My lovely checked exception...");
+            } catch (Throwable e) {
+                e.printStackTrace();
+                fail("A throwable instead of a checked exception...");
+            }
+
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+            fail("?!? invalid URL ???");
+        }
 
     }
 
     public void test01_runRuntimeException() {
-	try {
-	    AuthenticatorService withHandler = Service.create(
-		    new URL("http://localhost:4204/AuthenticatorServiceBean?wsdl"), 
-		    new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanService"))
-		    .getPort(AuthenticatorService.class);
-	    assertNotNull(withHandler);
-
-	    AuthenticatorService noHandler = Service.create(
-		    new URL("http://localhost:4204/AuthenticatorServiceBeanNoHandler?wsdl"), 
-		    new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanNoHandlerService"))
-		    .getPort(AuthenticatorService.class);
-	    assertNotNull(noHandler);
-
-	    try {
-		withHandler.authenticateRuntime("John", "Doe");
-	    } catch (WrongPasswordRuntimeException e) {
-		fail("My checked exception instead of a throwableS...");
-	    } catch (Throwable e) {
-		System.out.println("A throwable exception...");
-	    }
-
-
-	    try {
-		noHandler.authenticateRuntime("John", "Doe");
-	    } catch (WrongPasswordRuntimeException e) {
-		fail("My checked exception instead of a throwableS...");
-	    } catch (Throwable e) {
-		System.out.println("A throwable exception...");
-	    }
-
-	} catch (MalformedURLException e) {
-	    fail("?!? invalid URL ???");
-	}
+        try {
+            AuthenticatorService withHandler = Service.create(
+                new URL("http://localhost:4204/AuthenticatorServiceBean?wsdl"),
+                new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanService"))
+                .getPort(AuthenticatorService.class);
+            assertNotNull(withHandler);
+
+            AuthenticatorService noHandler = Service.create(
+                new URL("http://localhost:4204/AuthenticatorServiceBeanNoHandler?wsdl"),
+                new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanNoHandlerService"))
+                .getPort(AuthenticatorService.class);
+            assertNotNull(noHandler);
+
+            try {
+                withHandler.authenticateRuntime("John", "Doe");
+            } catch (WrongPasswordRuntimeException e) {
+                e.printStackTrace();
+                fail("My checked exception instead of a throwableS...");
+            } catch (Throwable e) {
+                System.out.println("A throwable exception...");
+            }
+
+
+            try {
+                noHandler.authenticateRuntime("John", "Doe");
+            } catch (WrongPasswordRuntimeException e) {
+                e.printStackTrace();
+                fail("My checked exception instead of a throwableS...");
+            } catch (Throwable e) {
+                System.out.println("A throwable exception...");
+            }
+
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+            fail("?!? invalid URL ???");
+        }
 
     }
 



Mime
View raw message