Package com.bazaarvoice.jolt.traversr

Examples of com.bazaarvoice.jolt.traversr.Traversr


        if ( dotNotation.contains("*") || dotNotation.contains("$")) {
            throw new SpecException("DotNotation (write key) can not contain '*' or '$'.");
        }

        List<PathElement> paths;
        Traversr trav;

        if ( StringTools.isNotBlank( dotNotation ) ) {

            // Compute the path elements.
            paths = ShiftrSpec.parseDotNotationRHS( dotNotation );
View Full Code Here


    @Test(dataProvider = "inAndOutTestCases")
    public void setTest(String testCaseName, List<String> outputs, Object notUsedInThisTest, String traversrPath, List<String> keys, Map<String, Object> expected) throws Exception
    {
        Map<String, Object> actual = new HashMap<String, Object>();

        Traversr traversr = new ShiftrTraversr( traversrPath );
        for ( String output : outputs ) {
            traversr.set( actual, keys, output );
        }

        JoltTestUtil.runDiffy( testCaseName, expected, actual );
    }
View Full Code Here

    }

    @Test(dataProvider = "inAndOutTestCases")
    public void getTest(String testCaseName, List<String> notUsedInThisTest, Object expected, String traversrPath, List<String> keys, Map<String, Object> tree) throws Exception
    {
        Traversr traversr = new ShiftrTraversr( traversrPath  );
        Object actual = traversr.get( tree, keys);

        JoltTestUtil.runDiffy( testCaseName, expected, actual );
    }
View Full Code Here

        if ( dotNotation.contains("@") || dotNotation.contains("*") || dotNotation.contains("$")) {
            throw new SpecException("DotNotation (write key) can not contain '@', '*', or '$'.");
        }

        List<PathElement> paths;
        Traversr trav;

        if ( StringUtils.isNotBlank( dotNotation ) ) {
            String[] split = dotNotation.split( "\\." );

            paths = ShiftrSpec.parse( split );
View Full Code Here

        if ( dotNotation.contains("@") || dotNotation.contains("*") || dotNotation.contains("$")) {
            throw new SpecException("DotNotation (write key) can not contain '@', '*', or '$'.");
        }

        List<PathElement> paths;
        Traversr trav;

        if ( StringUtils.isNotBlank( dotNotation ) ) {
            String[] split = dotNotation.split( "\\." );

            paths = ShiftrSpec.parse( split );
View Full Code Here

        if ( dotNotation.contains("@") || dotNotation.contains("*") || dotNotation.contains("$")) {
            throw new SpecException("DotNotation (write key) can not contain '@', '*', or '$'.");
        }

        List<PathElement> paths;
        Traversr trav;

        if ( StringTools.isNotBlank(dotNotation) ) {
            String[] split = dotNotation.split( "\\." );

            paths = ShiftrSpec.parse( split );
View Full Code Here

TOP

Related Classes of com.bazaarvoice.jolt.traversr.Traversr

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.