gdaniels 02/02/28 08:48:45 Modified: java/test/wsdl/interop3/import1 Import1TestCase.java java/test/wsdl/interop3/import2 Import2TestCase.java java/test/wsdl/interop3/import3 Import3TestCase.java Log: Check equality in test cases Revision Changes Path 1.3 +19 -3 xml-axis/java/test/wsdl/interop3/import1/Import1TestCase.java Index: Import1TestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/import1/Import1TestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Import1TestCase.java 28 Feb 2002 13:58:10 -0000 1.2 +++ Import1TestCase.java 28 Feb 2002 16:48:44 -0000 1.3 @@ -1,6 +1,8 @@ package test.wsdl.interop3.import1; import test.wsdl.interop3.import1.definitions.SoapInteropImport1PortType; + +import java.net.URL; /* <!-- SOAP Builder's round III web services --> <!-- interoperability testing: import1 --> @@ -22,6 +24,8 @@ */ public class Import1TestCase extends junit.framework.TestCase { + static URL url = null; + public Import1TestCase(String name) { super(name); } @@ -29,7 +33,11 @@ public void testStep3() { SoapInteropImport1PortType binding; try { - binding = new Import1Locator().getSoapInteropImport1Port(); + if (url == null) { + binding = new Import1Locator().getSoapInteropImport1Port(); + } else { + binding = new Import1Locator().getSoapInteropImport1Port(url); + } } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); @@ -37,8 +45,9 @@ assertTrue("binding is null", binding != null); try { - String value = null; - value = binding.echoString(new String()); + String value = "import1 test string"; + String result = binding.echoString(value); + assertEquals("Strings didn't match", value, result); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); @@ -87,6 +96,13 @@ */ public static void main(String[] args) { + if (args.length == 1) { + try { + url = new URL(args[0]); + } catch (Exception e) { + } + } + junit.textui.TestRunner.run(new junit.framework.TestSuite(Import1TestCase.class)); } // main 1.3 +25 -4 xml-axis/java/test/wsdl/interop3/import2/Import2TestCase.java Index: Import2TestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/import2/Import2TestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Import2TestCase.java 28 Feb 2002 14:49:49 -0000 1.2 +++ Import2TestCase.java 28 Feb 2002 16:48:44 -0000 1.3 @@ -3,6 +3,8 @@ import test.wsdl.interop3.import2.definitions.SoapInteropImport2PortType; import test.wsdl.interop3.import2.xsd.SOAPStruct; +import java.net.URL; + /* <!-- SOAP Builder's round III web services --> <!-- interoperability testing: import2 --> @@ -24,6 +26,8 @@ */ public class Import2TestCase extends junit.framework.TestCase { + static URL url; + public Import2TestCase(String name) { super(name); } @@ -31,7 +35,11 @@ public void testStep3() { SoapInteropImport2PortType binding; try { - binding = new Import2Locator().getSoapInteropImport2Port(); + if (url == null) { + binding = new Import2Locator().getSoapInteropImport2Port(); + } else { + binding = new Import2Locator().getSoapInteropImport2Port(url); + } } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); @@ -39,8 +47,14 @@ assertTrue("binding is null", binding != null); try { - SOAPStruct value = null; - value = binding.echoStruct(new SOAPStruct()); + SOAPStruct value = new SOAPStruct(); + value.setVarString("import2 string"); + value.setVarInt(5); + value.setVarFloat(4.5F); + SOAPStruct result = binding.echoStruct(value); + assertEquals("String members didn't match", value.getVarString(), result.getVarString()); + assertEquals("int members didn't match", value.getVarInt(), result.getVarInt()); + //assertEquals("float members didn't match", value.getVarFloat(), result.getVarFloat()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); @@ -87,7 +101,7 @@ } */ -/* +/* Not working right now. public void testAbsoluteStep3() { test.wsdl.interop3.absimport2.definitions.SoapInteropImport2PortType binding; @@ -168,6 +182,13 @@ */ public static void main(String[] args) { + if (args.length == 1) { + try { + url = new URL(args[0]); + } catch (Exception e) { + } + } + junit.textui.TestRunner.run(new junit.framework.TestSuite(Import2TestCase.class)); } // main 1.3 +23 -3 xml-axis/java/test/wsdl/interop3/import3/Import3TestCase.java Index: Import3TestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/import3/Import3TestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Import3TestCase.java 28 Feb 2002 14:49:49 -0000 1.2 +++ Import3TestCase.java 28 Feb 2002 16:48:44 -0000 1.3 @@ -3,6 +3,8 @@ import test.wsdl.interop3.import3.xsd.SOAPStruct; +import java.net.URL; + /* <!-- SOAP Builder's round III web services --> <!-- interoperability testing: import3 --> @@ -24,6 +26,8 @@ */ public class Import3TestCase extends junit.framework.TestCase { + static URL url; + public Import3TestCase(String name) { super(name); } @@ -31,7 +35,11 @@ public void testStep3EchoStruct() { SoapInteropImport3PortType binding; try { - binding = new Import3Locator().getSoapInteropImport3Port(); + if (url == null) { + binding = new Import3Locator().getSoapInteropImport3Port(); + } else { + binding = new Import3Locator().getSoapInteropImport3Port(url); + } } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); @@ -39,8 +47,13 @@ assertTrue("binding is null", binding != null); try { - SOAPStruct value = null; - value = binding.echoStruct(new SOAPStruct()); + SOAPStruct value = new SOAPStruct(); + value.setVarString("import2 string"); + value.setVarInt(5); + value.setVarFloat(4.5F); + SOAPStruct result = binding.echoStruct(value); + assertEquals("String members didn't match", value.getVarString(), result.getVarString()); + assertEquals("int members didn't match", value.getVarInt(), result.getVarInt()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); @@ -106,6 +119,13 @@ public static void main(String[] args) { + if (args.length == 1) { + try { + url = new URL(args[0]); + } catch (Exception e) { + } + } + junit.textui.TestRunner.run(new junit.framework.TestSuite(Import3TestCase.class)); } // main