Package org.apache.tuscany.sca.databinding.javabeans

Examples of org.apache.tuscany.sca.databinding.javabeans.JavaBean2XMLStreamReader.transform()


        bean.str = "ABC";
        bean.i = 1;
        bean.arr = new long[] {1, 2, 3};
        bean.bean = new AnotherBean();
        bean.bean.setName("Name");
        XMLStreamReader reader = t2.transform(bean, null);
        XMLStreamReader2String t3 = new XMLStreamReader2String();
        String xml = t3.transform(reader, null);
        assertTrue(xml.contains("<JavaBean2XMLStreamReaderTestCase$MyBean>"
                     + "<arr>1</arr><arr>2</arr><arr>3</arr><bean><name>Name</name></bean>"
                     + "<i>1</i><str>ABC</str></JavaBean2XMLStreamReaderTestCase$MyBean>"));
View Full Code Here


        bean.str = "ABC";
        bean.i = 1;
        bean.arr = new long[] {1, 2, 3};
        bean.bean = new AnotherBean();
        bean.bean.setName("Name");
        XMLStreamReader reader = t2.transform(bean, null);
        XMLStreamReader2String t3 = new XMLStreamReader2String();
        String xml = t3.transform(reader, null);
        assertTrue(xml.contains("<JavaBean2XMLStreamReaderTestCase$MyBean>"
                     + "<arr>1</arr><arr>2</arr><arr>3</arr><bean><name>Name</name></bean>"
                     + "<i>1</i><str>ABC</str></JavaBean2XMLStreamReaderTestCase$MyBean>"));
View Full Code Here

        bean.str = "ABC";
        bean.i = 1;
        bean.arr = new long[] {1, 2, 3};
        bean.bean = new AnotherBean();
        bean.bean.setName("Name");
        XMLStreamReader reader = t2.transform(bean, null);
        XMLStreamReader2String t3 = new XMLStreamReader2String();
        String xml = t3.transform(reader, null);
        XMLAssert.assertXMLEqual(XML_RESULT, xml);

    }
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.