Package org.custommonkey.xmlunit

Examples of org.custommonkey.xmlunit.XpathEngine.evaluate()


            result = queryResult2String(broker, seq, 0);
            System.out.println("RESULT: " + result);
            XMLAssert.assertEquals("<para>" + MATCH_START + "test]test" + MATCH_END + " " + MATCH_START + "test[test"
                + MATCH_END + " " + MATCH_START + "test?test" + MATCH_END + "</para>", result);

            match = xpe.evaluate("//exist:match", XMLUnit.buildControlDocument(result));
            System.out.println("MATCH: " + match);

            seq = xquery.execute("//para[ngram:wildcard-contains(., '^" + wildcardQuery + "')]", null,
                AccessContext.TEST);
            assertNotNull(seq);
View Full Code Here


            result = queryResult2String(broker, seq, 0);
            System.out.println("RESULT: " + result);
            XMLAssert.assertEquals("<para>" + MATCH_START + "test]test" + MATCH_END + " test[test test?test</para>",
                result);

            match = xpe.evaluate("//exist:match", XMLUnit.buildControlDocument(result));
            System.out.println("MATCH: " + match);

            seq = xquery.execute("//para[ngram:wildcard-contains(., '" + wildcardQuery + "$')]", null,
                AccessContext.TEST);
            assertNotNull(seq);
View Full Code Here

            result = queryResult2String(broker, seq, 0);
            System.out.println("RESULT: " + result);
            XMLAssert.assertEquals("<para>test]test test[test " + MATCH_START + "test?test" + MATCH_END + "</para>",
                result);

            match = xpe.evaluate("//exist:match", XMLUnit.buildControlDocument(result));
            System.out.println("MATCH: " + match);

            wildcardQuery = "^aaa.aaa$";
            seq = xquery.execute("//para[ngram:wildcard-contains(., '" + wildcardQuery + "')]", null,
                AccessContext.TEST);
View Full Code Here

            assertEquals(1, seq.getItemCount());
            result = queryResult2String(broker, seq, 0);
            System.out.println("RESULT: " + result);
            XMLAssert.assertEquals("<para>" + MATCH_START + "aaacaaa" + MATCH_END + "</para>", result);

            match = xpe.evaluate("//exist:match", XMLUnit.buildControlDocument(result));
            System.out.println("MATCH: " + match);
            assertMatches(wildcardQuery, match);

            wildcardQuery = ".+simple";
            seq = xquery.execute("//para[ngram:wildcard-contains(., '" + wildcardQuery + "')]", null,
View Full Code Here

            assertEquals(1, seq.getItemCount());
            result = queryResult2String(broker, seq, 0);
            System.out.println("RESULT: " + result);
            XMLAssert.assertEquals("<para>" + MATCH_START + "a simple" + MATCH_END + " paragraph</para>", result);

            match = xpe.evaluate("//exist:match", XMLUnit.buildControlDocument(result));
            System.out.println("MATCH: " + match);
            assertMatches(wildcardQuery, match);

            wildcardQuery = "a s.?i.?m.?p.?l.?e.?";
            seq = xquery.execute("//para[ngram:wildcard-contains(., '" + wildcardQuery + "')]", null,
View Full Code Here

            assertEquals(1, seq.getItemCount());
            result = queryResult2String(broker, seq, 0);
            System.out.println("RESULT: " + result);
            XMLAssert.assertEquals("<para>" + MATCH_START + "a simple " + MATCH_END + "paragraph</para>", result);

            match = xpe.evaluate("//exist:match", XMLUnit.buildControlDocument(result));
            System.out.println("MATCH: " + match);
            assertMatches(wildcardQuery, match);

            wildcardQuery = "a s.?i.?m.?p.?l.?e.?";
            seq = xquery.execute("//para[ngram:wildcard-contains(., '" + wildcardQuery + "')]", null,
View Full Code Here

            assertEquals(1, seq.getItemCount());
            result = queryResult2String(broker, seq, 0);
            System.out.println("RESULT: " + result);
            XMLAssert.assertEquals("<para>" + MATCH_START + "a simple " + MATCH_END + "paragraph</para>", result);

            match = xpe.evaluate("//exist:match", XMLUnit.buildControlDocument(result));
            System.out.println("MATCH: " + match);
            assertMatches(wildcardQuery, match);

            wildcardQuery = "b.{3,6}c";
            seq = xquery.execute("//para[ngram:wildcard-contains(., '" + wildcardQuery + "')]", null,
View Full Code Here

            for (int i = 0; i < 2; i++) {
                result = queryResult2String(broker, seq, i);
                System.out.println("RESULT: " + result);

                match = xpe.evaluate("//exist:match", XMLUnit.buildControlDocument(result));
                System.out.println("MATCH: " + match);
                assertMatches(wildcardQuery, match);
            }

        } catch (Exception e) {
View Full Code Here

        String basePath = "/gml:curveProperty/gml:Curve/gml:segments/gml:ArcString";
        assertEquals(1,
                xpath.getMatchingNodes(basePath + "[@interpolation='circularArc3Points']", dom)
                        .getLength());
        assertEquals("1.0 1.0 2.0 2.0 3.0 1.0 5.0 5.0 7.0 3.0",
                xpath.evaluate(basePath + "/gml:posList", dom));
    }

    public void testEncodeCompound() throws Exception {
        // create a compound curve
        CurvedGeometryFactory factory = new CurvedGeometryFactory(0.1);
View Full Code Here

        String basePath1 = "/gml:curveProperty/gml:Curve/gml:segments/gml:ArcString";
        assertEquals(1,
                xpath.getMatchingNodes(basePath1 + "[@interpolation='circularArc3Points']", dom)
                        .getLength());
        assertEquals("1.0 1.0 2.0 2.0 3.0 1.0 5.0 5.0 7.0 3.0",
                xpath.evaluate(basePath1 + "/gml:posList", dom));

        // the straight portion
        String basePath2 = "/gml:curveProperty/gml:Curve/gml:segments/gml:LineStringSegment";
        assertEquals(1, xpath.getMatchingNodes(basePath2 + "[@interpolation='linear']", dom)
                .getLength());
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.