Package cc.plural.jsonij.jpath

Examples of cc.plural.jsonij.jpath.SimpleIndexPredicate


        String testString = "/rah/boop[1]/boop[55]";
        JPathParser instance = new JPathParser();
        JPath<Component> result = instance.parse(testString);
        KeyComponent expResult1 = new KeyComponent("rah");
       KeyComponent expResult2 = new KeyComponent("boop");
        SimpleIndexPredicate expResult3 = new SimpleIndexPredicate(1);
        SimpleIndexPredicate expResult5 = new SimpleIndexPredicate(55);
        assertEquals(result.size(), 5, 0);
        assertEquals(expResult1, result.get(0));
        assertEquals(expResult2, result.get(1));
        assertEquals(expResult3, result.get(2));
        assertEquals(expResult2, result.get(3));
View Full Code Here


    public void testReadSimpleIndex() throws Exception {
        System.out.println("readSimpleIndex");
        String testString = "[1]/";
        JPathParser.JPathReader target = new JPathParser.JPathReader(testString);
        JPathParser instance = new JPathParser();
        SimpleIndexPredicate expResult = new SimpleIndexPredicate(1);
        PredicateComponent result = instance.readPredicate(target);
        assertEquals(expResult, result);
        testString = "[-3]";
        target = new JPathParser.JPathReader(testString);
        expResult = new SimpleIndexPredicate(-3);
        result = instance.readPredicate(target);
        assertEquals(expResult, result);
    }
View Full Code Here

TOP

Related Classes of cc.plural.jsonij.jpath.SimpleIndexPredicate

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.