Package org.tempuri

Examples of org.tempuri.Update



public class AllTest extends TestCase {

    public void testAll(){
        Update update = new Update();
        update.setArg0("test");
        update.setArg1(true);
        update.setId(2);


        try {
            OMElement omElement = update.getOMElement(Update.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("om string ==> " + omElementString);
            omElementString = "<ns1:Update xmlns:ns1=\"http://tempuri.org/\"><ns1:arg1>true</ns1:arg1><ns1:id>2</ns1:id><ns1:arg0>test</ns1:arg0></ns1:Update>";
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
            Update newUpdate = Update.Factory.parse(xmlReader);
            assertEquals(update.getArg0(),newUpdate.getArg0());
            assertEquals(update.getArg1(),newUpdate.getArg1());
            assertEquals(update.getId(),newUpdate.getId());
        } catch (Exception e) {
            assertFalse(true);
        }
    }
View Full Code Here



public class AllTest extends TestCase {

    public void testAll(){
        Update update = new Update();
        update.setArg0("test");
        update.setArg1(true);
        update.setId(2);


        try {
            OMElement omElement = update.getOMElement(Update.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("om string ==> " + omElementString);
            omElementString = "<ns1:Update xmlns:ns1=\"http://tempuri.org/\"><ns1:arg1>true</ns1:arg1><ns1:id>2</ns1:id><ns1:arg0>test</ns1:arg0></ns1:Update>";
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
            Update newUpdate = Update.Factory.parse(xmlReader);
            assertEquals(update.getArg0(),newUpdate.getArg0());
            assertEquals(update.getArg1(),newUpdate.getArg1());
            assertEquals(update.getId(),newUpdate.getId());
        } catch (Exception e) {
            assertFalse(true);
        }
    }
View Full Code Here


public class AllTest extends TestCase {

    public void testAll(){
        Update update = new Update();
        update.setArg0("test");
        update.setArg1(true);
        update.setId(2);

        OMElement omElement = update.getOMElement(Update.MY_QNAME, OMAbstractFactory.getOMFactory());
        try {
            String omElementString = omElement.toStringWithConsume();
            System.out.println("om string ==> " + omElementString);
            omElementString = "<ns1:Update xmlns:ns1=\"http://tempuri.org/\"><ns1:arg1>true</ns1:arg1><ns1:id>2</ns1:id><ns1:arg0>test</ns1:arg0></ns1:Update>";
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
            Update newUpdate = Update.Factory.parse(xmlReader);
            assertEquals(update.getArg0(),newUpdate.getArg0());
            assertEquals(update.getArg1(),newUpdate.getArg1());
            assertEquals(update.getId(),newUpdate.getId());
        } catch (Exception e) {
            assertFalse(true);
        }
    }
View Full Code Here

TOP

Related Classes of org.tempuri.Update

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.