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

Examples of org.apache.tuscany.sca.databinding.javabeans.JavaBean2XMLStreamReaderTransformer


    protected void setUp() throws Exception {
        super.setUp();
    }

    public void testTransformation() throws Exception {
        JavaBean2XMLStreamReaderTransformer t2 = new JavaBean2XMLStreamReaderTransformer();
        MyBean bean = new MyBean();
        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


            + "<arr>1</arr><arr>2</arr><arr>3</arr><bean><name>Name</name></bean><i>1</i><str>ABC</str>"
            + "</MyBean>";

    @Test
    public void testTransformation() throws Exception {
        JavaBean2XMLStreamReaderTransformer t2 = new JavaBean2XMLStreamReaderTransformer();
        MyBean bean = new MyBean();
        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

    protected void setUp() throws Exception {
        super.setUp();
    }

    public void testTransformation() throws Exception {
        JavaBean2XMLStreamReaderTransformer t2 = new JavaBean2XMLStreamReaderTransformer();
        MyBean bean = new MyBean();
        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

            + "<arr>1</arr><arr>2</arr><arr>3</arr><bean><name>Name</name></bean><i>1</i><str>ABC</str>"
            + "</MyBean>";

    @Test
    public void testTransformation() throws Exception {
        JavaBean2XMLStreamReaderTransformer t2 = new JavaBean2XMLStreamReaderTransformer();
        MyBean bean = new MyBean();
        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(new DefaultExtensionPointRegistry());
        String xml = t3.transform(reader, null);
        XMLAssert.assertXMLEqual(XML_RESULT, xml);

    }
View Full Code Here

            + "<arr>1</arr><arr>2</arr><arr>3</arr><bean><name>Name</name></bean><i>1</i><str>ABC</str>"
            + "</MyBean>";

    @Test
    public void testTransformation() throws Exception {
        JavaBean2XMLStreamReaderTransformer t2 = new JavaBean2XMLStreamReaderTransformer();
        MyBean bean = new MyBean();
        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

    protected void setUp() throws Exception {
        super.setUp();
    }

    public void testTransformation() throws Exception {
        JavaBean2XMLStreamReaderTransformer t2 = new JavaBean2XMLStreamReaderTransformer();
        MyBean bean = new MyBean();
        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

            + "<arr>1</arr><arr>2</arr><arr>3</arr><bean><name>Name</name></bean><i>1</i><str>ABC</str>"
            + "</MyBean>";

    @Test
    public void testTransformation() throws Exception {
        JavaBean2XMLStreamReaderTransformer t2 = new JavaBean2XMLStreamReaderTransformer();
        MyBean bean = new MyBean();
        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(new DefaultExtensionPointRegistry());
        String xml = t3.transform(reader, null);
        XMLAssert.assertXMLEqual(XML_RESULT, xml);

    }
View Full Code Here

            + "<arr>1</arr><arr>2</arr><arr>3</arr><bean><name>Name</name></bean><i>1</i><str>ABC</str>"
            + "</MyBean>";

    @Test
    public void testTransformation() throws Exception {
        JavaBean2XMLStreamReaderTransformer t2 = new JavaBean2XMLStreamReaderTransformer();
        MyBean bean = new MyBean();
        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(new DefaultExtensionPointRegistry());
        String xml = t3.transform(reader, null);
        XMLAssert.assertXMLEqual(XML_RESULT, xml);

    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.databinding.javabeans.JavaBean2XMLStreamReaderTransformer

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.