Examples of NodeTypeTest


Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

    /**
     * Tests using a type test for nodes. This should return all nodes.
     */
    public void testIterateWithNodeType()
    {
        NodeTypeTest test = new NodeTypeTest(Compiler.NODE_TYPE_NODE);
        ConfigurationNodeIteratorChildren it = new ConfigurationNodeIteratorChildren(
                rootPointer, test, false, null);
        assertEquals("Node type not evaluated", CHILD_COUNT, iteratorSize(it));
    }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

     * Tests using a type test for a non supported type. This should return an
     * empty iteration.
     */
    public void testIterateWithUnknownType()
    {
        NodeTypeTest test = new NodeTypeTest(Compiler.NODE_TYPE_COMMENT);
        ConfigurationNodeIteratorChildren it = new ConfigurationNodeIteratorChildren(
                rootPointer, test, false, null);
        assertEquals("Unknown node type not evaluated", 0, iteratorSize(it));
    }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

                        node, name) : createSubNodeListForName(node, name);
            }

            else if (test instanceof NodeTypeTest)
            {
                NodeTypeTest typeTest = (NodeTypeTest) test;
                if (typeTest.getNodeType() == Compiler.NODE_TYPE_NODE
                        || typeTest.getNodeType() == Compiler.NODE_TYPE_TEXT)
                {
                    return getNodeHandler().getChildren(node);
                }
            }
        }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

     * Tests using a type test for nodes. This should return all nodes.
     */
    @Test
    public void testIterateWithNodeType()
    {
        NodeTypeTest test = new NodeTypeTest(Compiler.NODE_TYPE_NODE);
        ConfigurationNodeIteratorChildren<ImmutableNode> it =
                new ConfigurationNodeIteratorChildren<ImmutableNode>(
                        rootPointer, test, false, null);
        assertEquals("Node type not evaluated", CHILD_COUNT, iteratorSize(it));
    }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

     * empty iteration.
     */
    @Test
    public void testIterateWithUnknownType()
    {
        NodeTypeTest test = new NodeTypeTest(Compiler.NODE_TYPE_COMMENT);
        ConfigurationNodeIteratorChildren<ImmutableNode> it =
                new ConfigurationNodeIteratorChildren<ImmutableNode>(
                        rootPointer, test, false, null);
        assertEquals("Unknown node type not evaluated", 0, iteratorSize(it));
    }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

     * Tests the testNode() method.
     */
    @Test
    public void testTestNode()
    {
        NodeTest test = new NodeTypeTest(Compiler.NODE_TYPE_TEXT);
        assertTrue("No a text node", pointer.testNode(test));
        test = new NodeTypeTest(Compiler.NODE_TYPE_COMMENT);
        assertFalse("A comment node", pointer.testNode(test));
    }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

                        node, name) : createSubNodeListForName(node, name);
            }

            else if (test instanceof NodeTypeTest)
            {
                NodeTypeTest typeTest = (NodeTypeTest) test;
                if (typeTest.getNodeType() == Compiler.NODE_TYPE_NODE
                        || typeTest.getNodeType() == Compiler.NODE_TYPE_TEXT)
                {
                    return getNodeHandler().getChildren(node);
                }
            }
        }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

                }
            }

            else if (test instanceof NodeTypeTest)
            {
                NodeTypeTest typeTest = (NodeTypeTest) test;
                if (typeTest.getNodeType() == Compiler.NODE_TYPE_NODE
                        || typeTest.getNodeType() == Compiler.NODE_TYPE_TEXT)
                {
                    return children;
                }
            }
        }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

    /**
     * Tests using a type test for nodes. This should return all nodes.
     */
    public void testIterateWithNodeType()
    {
        NodeTypeTest test = new NodeTypeTest(Compiler.NODE_TYPE_NODE);
        ConfigurationNodeIteratorChildren it = new ConfigurationNodeIteratorChildren(
                rootPointer, test, false, null);
        assertEquals("Node type not evaluated", CHILD_COUNT, iteratorSize(it));
    }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.compiler.NodeTypeTest

     * Tests using a type test for a non supported type. This should return an
     * empty iteration.
     */
    public void testIterateWithUnknownType()
    {
        NodeTypeTest test = new NodeTypeTest(Compiler.NODE_TYPE_COMMENT);
        ConfigurationNodeIteratorChildren it = new ConfigurationNodeIteratorChildren(
                rootPointer, test, false, null);
        assertEquals("Unknown node type not evaluated", 0, iteratorSize(it));
    }
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.