Package com.googlecode.objectify.test.PolymorphicAAATests

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


    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

  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

TOP

Related Classes of com.googlecode.objectify.test.PolymorphicAAATests.Mammal

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.