Package siena.base.test.model

Examples of siena.base.test.model.RelatedSimpleReferencedParent


  public void testRelatedSimpleReference() {

    RelatedSimpleReferencedChild adam1 = new RelatedSimpleReferencedChild("adam1");
    adam1.insert();

    RelatedSimpleReferencedParent god = new RelatedSimpleReferencedParent("god");
    god.child = adam1;       
    god.insert();
   
    assertNotNull(god.id);
    assertNotNull(god.child.id);
   
    RelatedSimpleReferencedParent godbis = Model.getByKey(RelatedSimpleReferencedParent.class, god.id);
    RelatedSimpleReferencedChild adam1bis = Model.getByKey(RelatedSimpleReferencedChild.class, godbis.child.id);
   
    assertEquals(god, godbis);
    assertEquals(adam1, adam1bis);
  }
View Full Code Here

TOP

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

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.