Package siena.base.test.model

Examples of siena.base.test.model.RelatedSeveralQueryNoAsParent


      assertEquals(adams.get(i+10), children.get(i));
    }
  }
 
  public void testRelatedSeveralQueryNoAs() {
    RelatedSeveralQueryNoAsParent god = new RelatedSeveralQueryNoAsParent("god");
    god.insert();

    RelatedSeveralQueryNoAsChild adam1 = new RelatedSeveralQueryNoAsChild("adam1");
    adam1.owner = god;
    adam1.insert();
   
    RelatedSeveralQueryNoAsChild adam2 = new RelatedSeveralQueryNoAsChild("adam2");
    adam2.owner = god;
    adam2.insert();


    assertNotNull(god.id);
    assertEquals(god.id, adam1.owner.id);
    assertEquals(god.id, adam2.owner.id);
   
    RelatedSeveralQueryNoAsParent godbis = Model.getByKey(RelatedSeveralQueryNoAsParent.class, god.id);
    List<RelatedSeveralQueryNoAsChild> children = godbis.children.fetch();
   
    assertEquals(god, godbis);
    assertEquals(adam1, children.get(0));
    assertEquals(adam2, children.get(1));
View Full Code Here

TOP

Related Classes of siena.base.test.model.RelatedSeveralQueryNoAsParent

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.