Package com.volantis.mcs.eclipse.common.odom.xpath

Examples of com.volantis.mcs.eclipse.common.odom.xpath.ODOMXPath.selectSingleNode()


    private void assertSelectFromODOMObservable(ODOMObservable odomObservable)
            throws XPathException {
        ODOMXPath xpath = new ODOMXPath(odomObservable);
        assertEquals("selected odomObservable", odomObservable,
                     xpath.selectSingleNode(doc));
    }


    /**
     * Mock ODOMXPath object that:
View Full Code Here


        assertTrue("Type should match", result instanceof Element);
        assertEquals("Value should match", "predicateElement",
                     ((Element) result).getName());

        assertNotNull("Should now be in the ODOM",
                      path.selectSingleNode((ODOMElement) root));


    }

View Full Code Here

        assertNotNull("Result should not be null", result);
        assertTrue("Type should match", result instanceof Text);
        ((Text) result).setText("Garbage");
        //showDocument();
        assertNotNull("Should now be in the ODOM",
                      xpath.selectSingleNode((ODOMElement) root));

    }


    /**
 
View Full Code Here

    public void testSelectSingleNodeWithNamespaces() throws Exception {

        // select the newElement node in the
        // http://www.w3.org/2001/XMLSchema namespace.
        ODOMXPath xpath = new ODOMXPath("ns1:newElement", NAMESPACES);
        ODOMObservable node = xpath.selectSingleNode((ODOMObservable) root);

        // ensure the node is not null
        assertNotNull("node selected was null", node);

        // should have returned a ODOMElement
View Full Code Here

        // use a different prefix (same URI) to that in the DOM
        ODOMXPath xpath = new ODOMXPath("p:newElement", new Namespace[]{
            Namespace.getNamespace("p", "http://www.w3.org/2001/XMLSchema")
        });

        ODOMObservable node = xpath.selectSingleNode((ODOMObservable) root);

        // ensure the node is not null
        assertNotNull("node selected was null", node);

        // should have returned a ODOMElement
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.