Package org.apache.harmony.beans.tests.java.beans.EncoderTest

Examples of org.apache.harmony.beans.tests.java.beans.EncoderTest.SampleBean


    public void testWriteObject_Integer() throws Exception {
        assertCodedXML(new Integer(3), "/xml/int.xml");
    }

    public void testWriteObject_StringCodec() throws Exception {
        SampleBean b = new SampleBean();
        b.setMyid("<Li Yang> & \"liyang'");
        SampleBean c = new SampleBean();
        c.setMyid("a child");
        b.setRef(c);
        assertCodedXML(b, "/xml/SampleBean_StringCodec.xml");
    }
View Full Code Here


    public void testWriteObject_Integer() throws Exception {
        assertCodedXML(new Integer(3), "/xml/int.xml");
    }

    public void testWriteObject_StringCodec() throws Exception {
        SampleBean b = new SampleBean();
        b.setMyid("<Li Yang> & \"liyang'");
        SampleBean c = new SampleBean();
        c.setMyid("a child");
        b.setRef(c);
        assertCodedXML(b, "/xml/SampleBean_StringCodec.xml");
    }
View Full Code Here

    }

    public void testReadObject_StringCodec() {
        XMLDecoder dec = new XMLDecoder(this.getClass().getResourceAsStream(
                "/xml/SampleBean_StringCodec.xml"));
        SampleBean obj = (SampleBean) dec.readObject();
        assertEquals("<Li Yang> & \"liyang'", obj.getMyid());
        assertEquals("a child", obj.getRef().getMyid());
    }
View Full Code Here

    public void testWriteObject_Integer() throws Exception {
        assertCodedXML(new Integer(3), "/xml/int.xml");
    }

    public void testWriteObject_StringCodec() throws Exception {
        SampleBean b = new SampleBean();
        b.setMyid("<Li Yang> & \"liyang'");
        SampleBean c = new SampleBean();
        c.setMyid("a child");
        b.setRef(c);
        assertCodedXML(b, "/xml/SampleBean_StringCodec.xml");
    }
View Full Code Here

    }

    public void testReadObject_StringCodec() {
        XMLDecoder dec = new XMLDecoder(this.getClass().getResourceAsStream(
                "/xml/SampleBean_StringCodec.xml"));
        SampleBean obj = (SampleBean) dec.readObject();
        assertEquals("<Li Yang> & \"liyang'", obj.getMyid());
        assertEquals("a child", obj.getRef().getMyid());
    }
View Full Code Here

    public void testWriteObject_Integer() throws Exception {
        assertCodedXML(new Integer(3), "/xml/int.xml");
    }

    public void testWriteObject_StringCodec() throws Exception {
        SampleBean b = new SampleBean();
        b.setMyid("<Li Yang> & \"liyang'");
        SampleBean c = new SampleBean();
        c.setMyid("a child");
        b.setRef(c);
        assertCodedXML(b, "/xml/SampleBean_StringCodec.xml");
    }
View Full Code Here

    public void testWriteObject_Integer() throws Exception {
        assertCodedXML(new Integer(3), "/xml/int.xml");
    }

    public void testWriteObject_StringCodec() throws Exception {
        SampleBean b = new SampleBean();
        b.setMyid("<Li Yang> & \"liyang'");
        SampleBean c = new SampleBean();
        c.setMyid("a child");
        b.setRef(c);
        assertCodedXML(b, "/xml/SampleBean_StringCodec.xml");
    }
View Full Code Here

    }

    public void testReadObject_StringCodec() {
        XMLDecoder dec = new XMLDecoder(this.getClass().getResourceAsStream(
                "/xml/SampleBean_StringCodec.xml"));
        SampleBean obj = (SampleBean) dec.readObject();
        assertEquals("<Li Yang> & \"liyang'", obj.getMyid());
        assertEquals("a child", obj.getRef().getMyid());
    }
View Full Code Here

    public void testWriteObject_Integer() throws Exception {
        assertCodedXML(new Integer(3), "/xml/int.xml");
    }

    public void testWriteObject_StringCodec() throws Exception {
        SampleBean b = new SampleBean();
        b.setMyid("<Li Yang> & \"liyang'");
        SampleBean c = new SampleBean();
        c.setMyid("a child");
        b.setRef(c);
        assertCodedXML(b, "/xml/SampleBean_StringCodec.xml");
    }
View Full Code Here

    }

    public void testReadObject_StringCodec() {
        XMLDecoder dec = new XMLDecoder(this.getClass().getResourceAsStream(
                "/xml/SampleBean_StringCodec.xml"));
        SampleBean obj = (SampleBean) dec.readObject();
        assertEquals("<Li Yang> & \"liyang'", obj.getMyid());
        assertEquals("a child", obj.getRef().getMyid());
    }
View Full Code Here

TOP

Related Classes of org.apache.harmony.beans.tests.java.beans.EncoderTest.SampleBean

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.