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.bidbuy.TestClient; 24 25 26 28 public class TestBidBuySample extends TestCase { 29 static Log log = 30 LogFactory.getLog(TestBidBuySample.class.getName()); 31 32 public TestBidBuySample(String name) { 33 super(name); 34 } 35 36 public void doTestDeploy () throws Exception { 37 String [] args = { "samples/bidbuy/deploy.wsdd" }; 38 AdminClient.main(args); 39 } 40 41 public void doTest () throws Exception { 42 String [] args = { "http://localhost:8080" }; 43 TestClient.main(args); 44 } 45 46 public void testBidBuyService () throws Exception { 47 try { 48 log.info("Testing bidbuy sample."); 49 log.info("Testing deployment..."); 50 doTestDeploy(); 51 log.info("Testing service..."); 52 doTest(); 53 log.info("Test complete."); 54 } 55 catch( Exception e ) { 56 e.printStackTrace(); 57 throw new Exception ("Fault returned from test: "+e); 58 } 59 } 60 61 public static void main(String [] args) throws Exception { 62 TestBidBuySample tester = new TestBidBuySample("test"); 63 tester.testBidBuyService(); 64 } 65 } 66 67 | Popular Tags |