Package com.thoughtworks.xstream.io.xml.xppdom

Examples of com.thoughtworks.xstream.io.xml.xppdom.XppDom


        assertDocumentProducedIs(a);
    }

    public void testSupportsAttributes() {
        final XppDom person = new XppDom("person");
        person.setAttribute("firstname", "Joe");
        person.setAttribute("lastname", "Walnes");
        assertDocumentProducedIs(person);
    }
View Full Code Here


        assertDocumentProducedIs(person);
    }

    public void testAttributesAreResettedForNewNode() {
        final XppDom[] roots = new XppDom[2];
        final XppDom person = roots[0] = new XppDom("person");
        person.setAttribute("firstname", "Joe");
        person.setAttribute("lastname", "Walnes");
        final XppDom project = roots[1] = new XppDom("project");
        project.setAttribute("XStream", "Codehaus");

        assertDocumentProducedIs(roots);
    }
View Full Code Here

        assertDocumentProducedIs(roots);
    }

    public void testSupportsEmptyNestedTags() {
        final XppDom parent = new XppDom("parent");
        parent.addChild(new XppDom("child"));

        assertDocumentProducedIs(parent);
    }
View Full Code Here

    public XppDom getConfiguration() {
        return (XppDom)getTopLevelNodes().get(0);
    }

    protected Object createNode(final String name) {
        final XppDom newNode = new XppDom(encodeNode(name));
        final XppDom top = top();
        if (top != null) {
            top().addChild(newNode);
        }
        return newNode;
    }
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.io.xml.xppdom.XppDom

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.