Examples of Zoo


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

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 = JsonXIOUtil.toByteArray(zooCompare, schema, true, buf());
       
        JsonIOUtil.mergeFrom(data, dzoo, schema, true);
        SerializableObjects.assertEquals(zooCompare, dzoo);
View Full Code Here

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

    }
   
    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

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

    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

Examples of jodd.petite.tst.Zoo

    pc.addBean("boo", boo, null);
    assertNotNull(boo.getFoo());
    assertSame(foo, boo.getFoo());
    assertNotNull(boo.zoo);

    Zoo zoo = (Zoo) pc.getBean("zoo");
    assertNotNull(zoo.boo);
    assertSame(zoo, boo.zoo);        // circular dependency
    assertSame(boo, zoo.boo);

    Boo boo2 = (Boo) pc.getBean("boo");
View Full Code Here

Examples of jodd.petite.tst.Zoo

    pc.registerPetiteBean(Zoo.class, null, null, null, false);
    pc.registerPetiteBean(Boo.class, null, null, null, false);

    Boo boo = (Boo) pc.getBean("boo");
    Foo foo = (Foo) pc.getBean("foo");
    Zoo zoo = (Zoo) pc.getBean("zoo");

    assertNotNull(boo.getFoo());
    assertSame(foo, boo.getFoo());

    assertNotNull(zoo.boo);
View Full Code Here

Examples of jodd.vtor.data.Zoo

  @Test
  public void testProfiles() {
    Vtor vtor = new Vtor();
    vtor.setValidateAllProfilesByDefault(true);
    Zoo zoo = new Zoo();

    vtor.validate(zoo);
    List<Violation> vlist = vtor.getViolations();
    assertEquals(3, vlist.size());
View Full Code Here

Examples of jodd.vtor.data.Zoo

  @Test
  public void testDefaultProfiles() {
    Vtor vtor = new Vtor();
    vtor.setValidateAllProfilesByDefault(false);
    Zoo zoo = new Zoo();

    vtor.validate(zoo);
    List<Violation> vlist = vtor.getViolations();
    assertEquals(1, vlist.size());
View Full Code Here

Examples of models.zoo.Zoo

    }

    @Ignore("wait for full fix")
    @Test
    public void testOrphanRemovalDepDeletion() {
  final Zoo zoo = new Zoo().save();
  zoo.lion = new Animal();
  zoo.save();
  zoo.lion = null; // lion escaped from zoo
  zoo.save(); // this line causes a violation exception: seems to be due
        // to a Hibernate bug (see
        // http://stackoverflow.com/questions/20280271/hibernate-jpa-onetoone-orphan-removal-still-not-working-as-of-4-2-7-4-3-0-cr1)
  assertEquals("There should be no animal left", 0, Animal.count());
  assertEquals("There should not be any meals left", 0, Meal.count());
    }
View Full Code Here

Examples of org.apache.cxf.demo.aegis.types.Zoo

        AegisWriter<XMLStreamWriter> writer = context.createXMLStreamWriter();
        FileOutputStream output = new FileOutputStream(outputPathname);
        XMLStreamWriter xmlWriter = outputFactory.createXMLStreamWriter(output);
        IndentingXMLStreamWriter indentWriter = new IndentingXMLStreamWriter(xmlWriter);

        Zoo zoo = populateZoo();
        Type aegisType = context.getTypeMapping().getType(zoo.getClass());
        writer.write(zoo, new QName("urn:aegis:demo", "zoo"), false, indentWriter, aegisType);
        xmlWriter.close();
        output.close();
    }
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.