From: Dr. C. G. J. <cg...@us...> - 2003-10-31 18:23:49
|
User: cgjung Date: 03/10/31 10:23:48 Modified: jboss.net/testsuite/src/main/org/jboss/test/ws4ee WS4EEUnitTestCase.java Log: Initial (working) J2EE1.4/WS4EE1.0 bits (see ChangeNote). Revision Changes Path 1.2 +19 -7 contrib/jboss.net/testsuite/src/main/org/jboss/test/ws4ee/WS4EEUnitTestCase.java Index: WS4EEUnitTestCase.java =================================================================== RCS file: /cvsroot/jboss/contrib/jboss.net/testsuite/src/main/org/jboss/test/ws4ee/WS4EEUnitTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WS4EEUnitTestCase.java 29 Oct 2003 10:48:07 -0000 1.1 +++ WS4EEUnitTestCase.java 31 Oct 2003 18:23:47 -0000 1.2 @@ -5,9 +5,11 @@ * See terms of license at gnu.org. */ -// $Id: WS4EEUnitTestCase.java,v 1.1 2003/10/29 10:48:07 cgjung Exp $ +// $Id: WS4EEUnitTestCase.java,v 1.2 2003/10/31 18:23:47 cgjung Exp $ -package org.jboss.test.ws4ee.test; +package org.jboss.test.ws4ee; + +import java.net.URL; import javax.ejb.*; import javax.naming.*; @@ -16,24 +18,27 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.jboss.test.JBossTestCase; +import org.jboss.test.net.AxisTestCase; /** * tests of the ws4ee functionality * @author Chr...@in... - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since 05/2003 */ public class WS4EEUnitTestCase - extends JBossTestCase + extends AxisTestCase { // Constants ----------------------------------------------------- - + protected String HELLO_END_POINT=END_POINT+"/HelloPortComponentEJB"; + /** the session bean with which we interact */ + protected HelloEndpoint hello; + // Attributes ---------------------------------------------------- // Static -------------------------------------------------------- - static boolean deployed = false; // Constructors -------------------------------------------------- public WS4EEUnitTestCase(String name) @@ -42,7 +47,11 @@ } // Public -------------------------------------------------------- - + /** where the config is stored */ + protected String getAxisConfiguration() { + return "ws4ee/client/"+super.getAxisConfiguration(); + } + /** * Lookup the bean, call it, remove it. * @@ -51,11 +60,14 @@ public void testHello() throws Exception { + hello=(HelloEndpoint) createAxisService(HelloEndpoint.class, + new URL(HELLO_END_POINT)); + assertEquals("Return value must be hello.",hello.hello("World"),"Hello World!"); } public static Test suite() throws Exception { - return getDeploySetup(WS4EEUnitTestCase.class, "ws4ee.ear"); + return getDeploySetup(WS4EEUnitTestCase.class, "ws4ee.jar"); } } |