Examples of Mammal


Examples of com.googlecode.objectify.test.PolymorphicAAATests.Mammal

    this.animal = new Animal();
    this.animal.name = "Ann";
    ofy().save().entity(this.animal).now();

    this.mammal = new Mammal();
    this.mammal.name = "Mamet";
    this.mammal.longHair = true;
    ofy().save().entity(this.mammal).now();

    this.cat = new Cat();
View Full Code Here

Examples of com.googlecode.objectify.test.PolymorphicAAATests.Mammal

    assert all.size() == 4;

    Animal ann = all.get(0);
    assert ann.name.equals(this.animal.name);

    Mammal mamet = (Mammal)all.get(1);
    assert mamet.longHair == this.mammal.longHair;

    Cat catrina = (Cat)all.get(2);
    assert catrina.hypoallergenic == this.cat.hypoallergenic;
View Full Code Here

Examples of com.googlecode.objectify.test.PolymorphicAAATests.Mammal

  public void testQueryMammal() throws Exception
  {
    List<Mammal> all = ofy().load().type(Mammal.class).list();
    assert all.size() == 3;

    Mammal mamet = (Mammal)all.get(0);
    assert mamet.longHair == this.mammal.longHair;

    Cat catrina = (Cat)all.get(1);
    assert catrina.hypoallergenic == this.cat.hypoallergenic;
View Full Code Here

Examples of org.apache.cxf.javascript.fortest.aegis.Mammal

    public BeanWithAnyTypeArray returnBeanWithAnyTypeArray() {
        BeanWithAnyTypeArray bwata = new BeanWithAnyTypeArray();
        bwata.setString("lima");
        Object[] obs = new Object[3];
        obs[0] = new Mammal();
        obs[1] = new Integer(42);
        obs[2] = new Vegetable(); // this is NOT in the WSDL.
        bwata.setObjects(obs);
        return bwata;
    }
View Full Code Here

Examples of org.apache.cxf.javascript.fortest.aegis.Mammal

    public BeanWithAnyTypeArray returnBeanWithAnyTypeArray() {
        BeanWithAnyTypeArray bwata = new BeanWithAnyTypeArray();
        bwata.setString("lima");
        Object[] obs = new Object[3];
        obs[0] = new Mammal();
        obs[1] = new Integer(42);
        obs[2] = new Vegetable(); // this is NOT in the WSDL.
        bwata.setObjects(obs);
        return bwata;
    }
View Full Code Here

Examples of org.apache.cxf.javascript.fortest.aegis.Mammal

    public BeanWithAnyTypeArray returnBeanWithAnyTypeArray() {
        BeanWithAnyTypeArray bwata = new BeanWithAnyTypeArray();
        bwata.setString("lima");
        Object[] obs = new Object[3];
        obs[0] = new Mammal();
        obs[1] = new Integer(42);
        obs[2] = new Vegetable(); // this is NOT in the WSDL.
        bwata.setObjects(obs);
        return bwata;
    }
View Full Code Here

Examples of org.apache.ojb.broker.Mammal

     */
    public void testPolymorphOneToMany()
    {

        ODMGZoo myZoo = new ODMGZoo("London");
        Mammal elephant = new Mammal(37, "Jumbo", 4);
        Mammal cat = new Mammal(11, "Silvester", 4);
        Reptile snake = new Reptile(3, "Kaa", "green");

        myZoo.addAnimal(snake);
        myZoo.addAnimal(elephant);
        myZoo.addAnimal(cat);
View Full Code Here

Examples of org.apache.ojb.broker.Mammal

     */
    public void testPolymorphOneToMany()
    {

        ODMGZoo myZoo = new ODMGZoo("London");
        Mammal elephant = new Mammal(37, "Jumbo", 4);
        Mammal cat = new Mammal(11, "Silvester", 4);
        Reptile snake = new Reptile(3, "Kaa", "green");

        myZoo.addAnimal(snake);
        myZoo.addAnimal(elephant);
        myZoo.addAnimal(cat);
View Full Code Here

Examples of org.apache.ojb.broker.Mammal

     */
    public void testPolymorphOneToMany()
    {

        ODMGZoo myZoo = new ODMGZoo("London");
        Mammal elephant = new Mammal(37, "Jumbo", 4);
        Mammal cat = new Mammal(11, "Silvester", 4);
        Reptile snake = new Reptile(3, "Kaa", "green");

        myZoo.addAnimal(snake);
        myZoo.addAnimal(elephant);
        myZoo.addAnimal(cat);
View Full Code Here

Examples of org.nutz.ioc.json.pojo.Mammal

  @Test
  public void test_simple() {
    IocLoader il = new JsonLoader("org/nutz/ioc/json/aop.js");
    Ioc ioc = new NutIoc(il);
    StringBuilder sb = ioc.get(StringBuilder.class, "sb");
    Mammal fox = ioc.get(Mammal.class, "fox");

    assertEquals("Fox", fox.getName());
    assertEquals("B:getName0;A:getName0;", sb.toString());
    sb.delete(0, sb.length());
    fox.getName();
    fox.getName();
    assertEquals("B:getName0;A:getName0;B:getName0;A:getName0;", sb.toString());

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