Examples of Upper


Examples of org.apache.pig.piggybank.evaluation.string.UPPER

public class TestEvalString extends TestCase {
 
    @Test
    public void testUPPER() throws Exception {
        UPPER func = new UPPER();

        // test excution
        String in = "Hello World!";
        String expected = "HELLO WORLD!";

        Tuple input = DefaultTupleFactory.getInstance().newTuple(in);

        String output = func.exec(input);
        assertTrue(output.equals(expected));

        // test schema creation

        // FIXME
View Full Code Here

Examples of org.boris.expr.function.excel.UPPER

        assertEquals(eval(t, ""), "");
        assertEquals(eval(t, "   "), "");
    }

    public void testUPPER() throws Exception {
        UPPER u = new UPPER();
        assertEquals(eval(u, "asdf"), "ASDF");
        assertEquals(eval(u, true), "TRUE");
        assertEquals(eval(u, 1), "1");
        assertException("upper(1,1)");
        assertResult("upper({1,2})", ExprError.VALUE);
View Full Code Here

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

Examples of sample.Upper

    @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

Examples of sample.Upper

     * 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

Examples of sample.Upper

     * 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

Examples of sample.Upper

     */
    @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

Examples of sample.Upper

     * 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
Copyright © 2018 www.massapi.com. 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.