Package org.custommonkey.xmlunit

Examples of org.custommonkey.xmlunit.NodeTest


public class test_CountingNodeTester extends TestCase {
    private NodeTest test;
    private CountingNodeTester tester;

    public void testPositivePath() throws Exception {
        test = new NodeTest(new StringReader("<a><b>c</b></a>"));
        tester = new CountingNodeTester(2);
        test.performTest(tester, Node.ELEMENT_NODE);

        tester = new CountingNodeTester(1);
        test.performTest(tester, Node.TEXT_NODE);
View Full Code Here


        tester = new CountingNodeTester(0);
        test.performTest(tester, Node.COMMENT_NODE);
    }

    public void testNegativePath() throws Exception {
        test = new NodeTest(new StringReader("<a><b>c</b></a>"));
        try {
            tester = new CountingNodeTester(2);
            test.performTest(tester, Node.TEXT_NODE);
            fail("Expected NodeTestException");
        } catch (NodeTestException e) {
View Full Code Here

TOP

Related Classes of org.custommonkey.xmlunit.NodeTest

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.