Package com.dyuproject.protostuff.runtime.PolymorphicSerializationTest

Examples of com.dyuproject.protostuff.runtime.PolymorphicSerializationTest.Zoo


    }
   
    public void testPolymorphic() throws Exception
    {
        Schema<Zoo> schema = RuntimeSchema.getSchema(Zoo.class);
        Zoo zooCompare = PolymorphicSerializationTest.filledZoo();
       
        Zoo dzoo = new Zoo();           
       
        byte[] data = JsonIOUtil.toByteArray(zooCompare, schema, true);
        JsonIOUtil.mergeFrom(data, dzoo, schema, true);
        SerializableObjects.assertEquals(zooCompare, dzoo);
    }
View Full Code Here


    }
   
    public void testPolymorphic() throws Exception
    {
        Schema<Zoo> schema = RuntimeSchema.getSchema(Zoo.class);
        Zoo zooCompare = PolymorphicSerializationTest.filledZoo();
       
        Zoo dzoo = new Zoo();           
       
        byte[] data = JsonXIOUtil.toByteArray(zooCompare, schema, true, buf());
       
        JsonIOUtil.mergeFrom(data, dzoo, schema, true);
        SerializableObjects.assertEquals(zooCompare, dzoo);
View Full Code Here

    }
   
    public void testPolymorphicStreamed() throws Exception
    {
        Schema<Zoo> schema = RuntimeSchema.getSchema(Zoo.class);
        Zoo zooCompare = PolymorphicSerializationTest.filledZoo();
       
        Zoo dzoo = new Zoo();  
       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        LinkedBuffer buffer = buf();
        try
        {
View Full Code Here

    public void testPolymorphic() throws Exception
    {
        Schema<Zoo> schema = RuntimeSchema.getSchema(Zoo.class);
        Pipe.Schema<Zoo> pipeSchema = ((MappedSchema<Zoo>)schema).getPipeSchema();
       
        Zoo zoo = PolymorphicSerializationTest.filledZoo();
       
        // numeric only
        protobufRoundTrip(zoo, schema, pipeSchema, true);
        protostuffRoundTrip(zoo, schema, pipeSchema, true);
    }
View Full Code Here

TOP

Related Classes of com.dyuproject.protostuff.runtime.PolymorphicSerializationTest.Zoo

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.