FileDocCategorySizeDatePackage
TestEchoSample.javaAPI DocApache Axis 1.42118Sat Apr 22 18:57:28 BST 2006test.functional

TestEchoSample

public class TestEchoSample extends TestCase
Test the stock sample code.

Fields Summary
static Log
log
Constructors Summary
public TestEchoSample(String name)


       
        super(name);
    
Methods Summary
public static voidmain(java.lang.String[] args)

        TestEchoSample tester = new TestEchoSample("tester");
        tester.testEchoService();
    
public voidtestEchoService()

        log.info("Testing echo interop sample.");

        // deploy the echo service
        String[] args = {"-l",
                         "local:///AdminService",
                         "samples/echo/deploy.wsdd"};
        AdminClient.main(args);

        // define the tests using JUnit assert facilities, and tell client to
        // throw any exceptions it catches.
        TestClient client = new TestClient(true) {
            public void verify(String method, Object sent, Object gotBack) {
                assertTrue("What was sent was not received--" + method + ": " + gotBack, equals(sent, gotBack));
            }
        };

        // run the tests using a local (in process) server
        client.setURL("local:");
        client.executeAll();

        log.info("Test complete.");