Examples of LPDMODOMFactory


Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

     * Test getSelection(). This test is a bit pointless but since we
     * already have this test class then we need at least one test.
     */
    public void testGetSelection() {

        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement el1 = (ODOMElement) factory.element("Element1");
        ODOMElement el2 = (ODOMElement) factory.element("Element2");
        ODOMElement el3 = (ODOMElement) factory.element("Element3");

        ODOMElement[] elements = new ODOMElement[]{el1, el2, el3};

        List expected = Arrays.asList(elements);

View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

//                IResource resource = new MockFile(
//                        deviceRAM.getDeviceRepositoryName());
                IResource resource = new MockFile(repository.getPath());

                // Create a tree for the dialog.
                LPDMODOMFactory factory = new LPDMODOMFactory();


                // Create first subtree
                Element parent1 = factory.element("parent1");
                Element child1a = factory.element("child1a");
                child1a.setAttribute("attr1", "value1");
                child1a.setAttribute("attr2", "value2");
                Element child1b = factory.element("child1b");
                parent1.addContent(child1a);
                parent1.addContent(child1b);

                // Create second subtree
                Element parent2 = factory.element("parent2");
                parent2.setAttribute("attr1", "value1");
                parent2.setAttribute("attr2", "value2");
                parent2.setAttribute("attr3", "value3");
                parent2.setAttribute("attr4", "value4");
                Element child2a = factory.element("child2a");
                Element child2b = factory.element("child2b");

                parent2.addContent(child2a);
                parent2.addContent(child2b);

                // Create the root element and add content
                Element rootNode = factory.element("root");
                rootNode.addContent(parent1);
                rootNode.addContent(parent2);

                XPath rootPath = new XPath(rootNode);
                XPath parent1Path = new XPath(parent1);
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

    /**
     * Ensure that the constructor only allows ODOMElements in the
     * selection.
     */
    public void testConstructorCreation() {
        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement e1 = (ODOMElement) factory.element("Element1");
        ODOMElement e2 = (ODOMElement) factory.element("Element2");
        ODOMElement e3 = (ODOMElement) factory.element("Element3");

        ArrayList elements = new ArrayList();
        elements.add(e1);
        elements.add(e2);
        elements.add(e3);
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

    /**
     * Test toList().
     */
    public void testToList() {
        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement el1 = (ODOMElement) factory.element("Element1");
        ODOMElement el2 = (ODOMElement) factory.element("Element2");
        ODOMElement el3 = (ODOMElement) factory.element("Element3");

        ODOMElement[] elements = new ODOMElement[]{el1, el2, el3};

        List expected = Arrays.asList(elements);

View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

    /**
     * Test toArray()
     */
    public void testToArray() {
        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement el1 = (ODOMElement) factory.element("Element1");
        ODOMElement el2 = (ODOMElement) factory.element("Element2");
        ODOMElement el3 = (ODOMElement) factory.element("Element3");

        ODOMElement[] elements = new ODOMElement[]{el1, el2, el3};

        ODOMElementSelection selection = new ODOMElementSelection(
                Arrays.asList(elements));
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

    /**
     * Test toODOMElementArray()
     */
    public void testToODOMElementArray() {
        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement e1 = (ODOMElement) factory.element("Element1");
        ODOMElement e2 = (ODOMElement) factory.element("Element2");
        ODOMElement e3 = (ODOMElement) factory.element("Element3");

        ODOMElement[] elements = new ODOMElement[]{e1, e2, e3};

        ODOMElementSelection selection = new ODOMElementSelection(
                Arrays.asList(elements));
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

    /**
     * Test toODOMElementArray()
     */
    public void testGetFirstElement() {
        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement e1 = (ODOMElement) factory.element("Element1");
        ODOMElement e2 = (ODOMElement) factory.element("Element2");
        ODOMElement e3 = (ODOMElement) factory.element("Element3");

        ODOMElement[] elements = new ODOMElement[]{e1, e2, e3};

        ODOMElementSelection selection = new ODOMElementSelection(
                Arrays.asList(elements));
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

    /**
     * Test iterator().
     */
    public void testIterator() {
        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement e1 = (ODOMElement) factory.element("Element1");
        ODOMElement e2 = (ODOMElement) factory.element("Element2");
        ODOMElement e3 = (ODOMElement) factory.element("Element3");

        ODOMElement[] elements = new ODOMElement[]{e1, e2, e3};

        ODOMElementSelection selection = new ODOMElementSelection(
                Arrays.asList(elements));
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

    /**
     * Test size().
     */
    public void testSize() {
        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement e1 = (ODOMElement) factory.element("Element1");
        ODOMElement e2 = (ODOMElement) factory.element("Element2");
        ODOMElement e3 = (ODOMElement) factory.element("Element3");

        ODOMElement[] elements = new ODOMElement[]{e1, e2, e3};

        ODOMElementSelection selection = new ODOMElementSelection(
                Arrays.asList(elements));
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.dom.LPDMODOMFactory

    /**
     * Test isEmpty()
     */
    public void testIsEmpty() {
        JDOMFactory factory = new LPDMODOMFactory();
        ODOMElement e1 = (ODOMElement) factory.element("Element1");

        ODOMElement[] elements = new ODOMElement[]{e1};

        ODOMElementSelection selection = new ODOMElementSelection(
                Arrays.asList(elements));
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.