Package org.apache.pig.builtin

Examples of org.apache.pig.builtin.ENDSWITH


        assertTrue("String prefix should match", startsWith.exec(testTuple2));
    }
   
    @Test
    public void testEndsWith() throws IOException {
        ENDSWITH endsWith = new ENDSWITH();
        Tuple testTuple1 = Util.buildTuple("foo", "bar");
        assertFalse("String suffix should not match", endsWith.exec(testTuple1));
        Tuple testTuple2 = Util.buildTuple("foobaz", "foo");
        assertFalse("String suffix should not match", endsWith.exec(testTuple2));
        Tuple testTuple3 = Util.buildTuple("foobaz", "baz");
        assertTrue("String suffix should match", endsWith.exec(testTuple3));
        Tuple testTuple4 = Util.buildTuple(null, "bar");
        assertNull("Should return null", endsWith.exec(testTuple4));
    }
View Full Code Here


        assertTrue("String prefix should match", startsWith.exec(testTuple2));
    }
   
    @Test
    public void testEndsWith() throws IOException {
        ENDSWITH endsWith = new ENDSWITH();
        Tuple testTuple1 = Util.buildTuple("foo", "bar");
        assertFalse("String suffix should not match", endsWith.exec(testTuple1));
        Tuple testTuple2 = Util.buildTuple("foobaz", "foo");
        assertFalse("String suffix should not match", endsWith.exec(testTuple2));
        Tuple testTuple3 = Util.buildTuple("foobaz", "baz");
        assertTrue("String suffix should match", endsWith.exec(testTuple3));
        Tuple testTuple4 = Util.buildTuple(null, "bar");
        assertNull("Should return null", endsWith.exec(testTuple4));
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.builtin.ENDSWITH

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.