summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/test/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplTest.java
blob: 149c3d2390d88e2af3732a44808eb9c81234444c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
 * HelloWorldServiceImplTest.java This file was auto-generated from WSDL by the
 * Apache Axis2 version: 0.94-SNAPSHOT Jan 10, 2006 (10:21:58 LKT)
 */
package org.apache.tuscany.samples.helloworldaxis;


/*
 *  HelloWorldServiceImplTest Junit test case
*/
public class HelloWorldServiceImplTest extends junit.framework.TestCase {
  
//FIXME we don't want to run this test as part of the main build, AXIS2 is not necessarily set up to run it    
    /**
     * Auto generated test method
     */
    public void testgetGreetings() throws java.lang.Exception {
//        org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImplStub stub =
//            new org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImplStub("http://localhost:8080/axis2/services/HelloWorldServiceImplService"); //the default implementation should point to the right endpoint
//
//        org.apache.tuscany.samples.helloworldaxis.GetGreetings param14 = (org.apache.tuscany.samples.helloworldaxis.GetGreetings) getTestObject(org.apache.tuscany.samples.helloworldaxis.GetGreetings.class);
//        param14.setIn0("Hello, World!");
//
//        // todo Fill in the param14 here
//        assertNotNull(stub.getGreetings(param14));
    }

    /**
     * Auto generated test method
     */
    public void testStartgetGreetings() throws java.lang.Exception {
//        org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImplStub stub =
//            new org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImplStub("http://localhost:8080/axis2/services/HelloWorldServiceImplService");
//        org.apache.tuscany.samples.helloworldaxis.GetGreetings param14 = (org.apache.tuscany.samples.helloworldaxis.GetGreetings) getTestObject(org.apache.tuscany.samples.helloworldaxis.GetGreetings.class);
//        param14.setIn0("Hello, World!");
//
//        // todo Fill in the param14 here
//        stub.startgetGreetings(param14, new tempCallbackN1000C());
    }

    //Create an ADBBean and provide it as the test object
    public org.apache.axis2.databinding.ADBBean getTestObject(
        java.lang.Class type) throws Exception {
        return (org.apache.axis2.databinding.ADBBean) type.newInstance();
    }

    private class tempCallbackN1000C
        extends org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImplCallbackHandler {
        public tempCallbackN1000C() {
            super(null);
        }

        public void receiveResultgetGreetings(
            org.apache.axis2.client.async.AsyncResult result) {
            assertNotNull(result.getResponseEnvelope().getBody()
                                .getFirstElement());
        }

        public void receiveErrorgetGreetings(java.lang.Exception e) {
            fail();
        }
    }
}