gdaniels 02/02/28 06:23:25
Modified: java/test/wsdl/interop3/compound1 Compound1TestCase.java
Log:
Testcase takes arguments.
Revision Changes Path
1.3 +13 -18
xml-axis/java/test/wsdl/interop3/compound1/Compound1TestCase.java
Index: Compound1TestCase.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/test/wsdl/interop3/compound1/Compound1TestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Compound1TestCase.java 27 Feb 2002 21:59:28 -0000 1.2
+++ Compound1TestCase.java 28 Feb 2002 14:23:25 -0000 1.3
@@ -25,23 +25,23 @@
*/
public class Compound1TestCase extends junit.framework.TestCase {
- URL url;
+ static URL url;
public Compound1TestCase(String name) {
super(name);
}
protected void setUp() throws Exception {
- try {
- url = new URL("http://localhost:8080/stkv3/wsdl/Compound1.wsdl");
- } catch (Exception e) {
- }
}
public void testStep3() {
SoapInteropCompound1Binding binding;
try {
- binding = new Compound1Locator().getSoapInteropCompound1Port();
+ if (url != null) {
+ binding = new Compound1Locator().getSoapInteropCompound1Port(url);
+ } else {
+ binding = new Compound1Locator().getSoapInteropCompound1Port();
+ }
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC
ServiceException caught: " + jre);
@@ -131,19 +131,14 @@
public static void main(String[] args) {
- junit.textui.TestRunner.run(new
junit.framework.TestSuite(Compound1TestCase.class));
- String str;
- str = AppendBaby(args);
- System.out.println(str);
+ if (args.length == 1) {
+ try {
+ url = new URL(args[0]);
+ } catch (Exception e) {
+ }
+ }
- String s2 = args[0] + ", baby";
+ junit.textui.TestRunner.run(new
junit.framework.TestSuite(Compound1TestCase.class));
} // main
-
- private static String AppendBaby(String[] args) {
- String str;
- str = args[0] + ", baby";
- return str;
- }
-
}