Package org.apache.axiom.om.impl.builder.test.xmlbeans

Examples of org.apache.axiom.om.impl.builder.test.xmlbeans.OrderDocument


import org.junit.Test;

public class SAXOMBuilderXMLBeansTest {
    @Test
    public void test() throws Exception {
        OrderDocument document = OrderDocument.Factory.newInstance();
        Order order = document.addNewOrder();
        order.setCustomerId("73107481");
        Item item = order.addNewItem();
        item.setPartId("P85-137-19");
        item.setQuantity(2);
        item = order.addNewItem();
        item.setPartId("O85-554-66");
        item.setQuantity(1);
       
        StringWriter out = new StringWriter();
        document.save(out);
        SAXOMBuilder builder = new SAXOMBuilder();
        document.save(builder, builder);
       
        assertXMLIdentical(compareXML(out.toString(), builder.getRootElement().toString()), true);
    }
View Full Code Here


import org.apache.axiom.om.impl.builder.test.xmlbeans.OrderDocument.Order.Item;
import org.custommonkey.xmlunit.XMLTestCase;

public class SAXOMBuilderXMLBeansTest extends XMLTestCase {
    public void test() throws Exception {
        OrderDocument document = OrderDocument.Factory.newInstance();
        Order order = document.addNewOrder();
        order.setCustomerId("73107481");
        Item item = order.addNewItem();
        item.setPartId("P85-137-19");
        item.setQuantity(2);
        item = order.addNewItem();
        item.setPartId("O85-554-66");
        item.setQuantity(1);
       
        StringWriter out = new StringWriter();
        document.save(out);
        SAXOMBuilder builder = new SAXOMBuilder();
        document.save(builder, builder);
       
        assertXMLIdentical(compareXML(out.toString(), builder.getRootElement().toString()), true);
    }
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.impl.builder.test.xmlbeans.OrderDocument

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.