1 16 17 package test.functional; 18 19 import junit.framework.TestCase; 20 import org.apache.axis.client.AdminClient; 21 import org.apache.axis.components.logger.LogFactory; 22 import org.apache.commons.logging.Log; 23 import samples.echo.TestClient; 24 25 27 public class TestEchoSample extends TestCase { 28 static Log log = 29 LogFactory.getLog(TestEchoSample.class.getName()); 30 31 public TestEchoSample(String name) { 32 super(name); 33 } 34 35 public static void main(String args[]) throws Exception { 36 TestEchoSample tester = new TestEchoSample("tester"); 37 tester.testEchoService(); 38 } 39 40 public void testEchoService () throws Exception { 41 log.info("Testing echo interop sample."); 42 43 String [] args = {"-l", 45 "local:///AdminService", 46 "samples/echo/deploy.wsdd"}; 47 AdminClient.main(args); 48 49 TestClient client = new TestClient(true) { 52 public void verify(String method, Object sent, Object gotBack) { 53 assertTrue("What was sent was not received--" + method + ": " + gotBack, equals(sent, gotBack)); 54 } 55 }; 56 57 client.setURL("local:"); 59 client.executeAll(); 60 61 log.info("Test complete."); 62 } 63 } 64 65 | Popular Tags |