Package com.googlecode.objectify.test.PolymorphicAAATests

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


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

    this.cat = new Cat();
    this.cat.name = "Catrina";
    this.cat.longHair = true;
    this.cat.hypoallergenic = true;
    ofy().save().entity(this.cat).now();
View Full Code Here


    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;

    Dog doug = (Dog)all.get(3);
    assert doug.loudness == this.dog.loudness;
  }
View Full Code Here

    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;

    Dog doug = (Dog)all.get(2);
    assert doug.loudness == this.dog.loudness;
  }
View Full Code Here

  public void testQueryCat() throws Exception
  {
    List<Cat> all = ofy().load().type(Cat.class).list();
    assert all.size() == 1;

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

  /** */
  @Test
  public void testFilterOnProperty() throws Exception
  {
    Cat other = new Cat();
    other.name = "OtherCat";
    other.hypoallergenic = false;
    other.longHair = false;

    ofy().save().entity(other).now();
View Full Code Here

TOP

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

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.