Package sample

Examples of sample.Upper


    }

    @Test
    public void testReference() {
        System.out.println("SampleNaiveAsyncTestCase.testReference");
        Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        final String r = upper.upper("async");
        System.out.println(r);
        assertEquals("ASYNC", r);
    }
View Full Code Here


    @Test
    @Ignore
    public void testReference() {
        System.out.println("SampleNaiveAsyncBareTestCase.testReference");
        Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        final String r = upper.upper("async");
        System.out.println(r);
        assertEquals("ASYNC", r);
    }
View Full Code Here

     * Show that we can make a basic call
     */
    @Test
    public void testUpper() {
        System.out.println("SampleNaiveAsyncTestCase.testUpper");
        Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        final String r = upper.upper("async");
        System.out.println(r);
        assertEquals("ASYNC", r);
    }
View Full Code Here

     * AsyncResponseInvoker
     */
    @Test
    public void testPersistAsyncResponseInvoker() {
        System.out.println("SampleNaiveAsyncTestCase.testUpper2");
        Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        // call upper to write out the async response invoker
        String r = upper.upper("async");
        // call upper2 to read it back in again
        r = upper.upper2("async2");
        System.out.println(r);
        assertEquals("ASYNC2", r);
    }  
View Full Code Here

     */
    @Test
    public void testServiceRestart() {
        System.out.println("SampleNaiveAsyncTestCase.testUpper2");
        System.out.println("Starting first node");
        Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        String r = upper.upper("async");
        System.out.println(r);
        assertEquals("ASYNC", r);
       
        System.out.println("Stopping first node");
        node.stop();
       
        // now start another node and try call back in to get the
        // async response to come back
       
        System.out.println("Starting second node");
        final NodeFactory nf = NodeFactory.getInstance();
        String here = SampleNativeAsyncTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString();
        // Create the node using the pattern "name of composite file to start" / Contribution to use
        node = nf.createNode("testnativeasync.composite", new Contribution("test", here));
        node.start();
        upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        r = upper.upper2("async2");
        System.out.println(r);
        assertEquals("ASYNC2", r);
    }     
View Full Code Here

     * Show that one-way operations work in the async case
     */
    @Test
    public void testVoid() {
        System.out.println("SampleNaiveAsyncTestCase.testUpperVoid");
        Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        final String r = upper.upperVoid("asyncVoid");
        System.out.println(r);
        assertEquals("ASYNCVOID", r);
    }   
View Full Code Here

TOP

Related Classes of sample.Upper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.