Package siena.base.test.model

Examples of siena.base.test.model.RelatedSimpleOwnedChild


    assertEquals(god, godbis);
    assertEquals(adam1, adam1bis);
  }
   
  public void testRelatedSimpleOwned() {
    RelatedSimpleOwnedChild adam1 = new RelatedSimpleOwnedChild("adam1");
   
    RelatedSimpleOwnedParent god = new RelatedSimpleOwnedParent("god");
    god.child.set(adam1);
    god.insert();
View Full Code Here


    assertEquals(god, godbis);
    assertEquals(adam1, godbis.child.get());
  }
 
  public void testRelatedSimpleOwnedNull() {
    RelatedSimpleOwnedChild adam1 = new RelatedSimpleOwnedChild("adam1");
   
    RelatedSimpleOwnedParent god = new RelatedSimpleOwnedParent("god");
    god.child.set(null);
    god.insert();
View Full Code Here

    assertEquals(god, godbis);
    assertNull(godbis.child.get());
  }
 
  public void testRelatedSimpleOwnedUpdate() {
    RelatedSimpleOwnedChild adam1 = new RelatedSimpleOwnedChild("adam1");
    RelatedSimpleOwnedChild adam2 = new RelatedSimpleOwnedChild("adam2");
    RelatedSimpleOwnedParent god = new RelatedSimpleOwnedParent("god");
    god.child.set(adam1);
    god.insert();

    assertNotNull(god.id);
    assertEquals(god.id, adam1.owner.id);
   
    RelatedSimpleOwnedParent godbis = Model.getByKey(RelatedSimpleOwnedParent.class, god.id);
   
    adam2.insert();
    god.child.set(adam2);
    god.update();

    RelatedSimpleOwnedParent godbis2 = Model.getByKey(RelatedSimpleOwnedParent.class, godbis.id);
View Full Code Here

    adam1.get();
    assertNull(adam1.owner);
  }
 
  public void testRelatedSimpleOwnedUpdate2null() {
    RelatedSimpleOwnedChild adam1 = new RelatedSimpleOwnedChild("adam1");
   
    RelatedSimpleOwnedParent god = new RelatedSimpleOwnedParent("god");
    god.child.set(adam1);
    god.insert();
View Full Code Here

TOP

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

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.