Package org.jugile.daims

Source Code of org.jugile.daims.DeltaTest

package org.jugile.daims;

import org.jugile.proto2.domain.*;
import org.jugile.util.JugileTestCase;
import org.jugile.util.Time;

public class DeltaTest extends JugileTestCase {

  public void testDelta() {
    Domain d = Domain.getDomain();
    Person p1 = d.createPerson();
    p1.setName("Jukka");
    p1.setAge(40);
    p1.setTs(new Time("11.11.2011"));
   
    Family f1 = d.createFamily();
    f1.setName("Rahkonen");
    p1.setFamily(f1);
   
    Person p2 = d.createPerson().setName("p2");
    Person p3 = d.createPerson().setName("p3");
//    f1.addFriendPerson(p2);
//    f1.addFriendPerson(p3);
//    f1.getFriendPersons().add(p2);
//    f1.getFriendPersons().add(p3);
    p2.getFriendFamilies().add(f1);
    p3.getFriendFamilies().add(f1);
    //print("delta:\n" + Domain.getUnitOfWork().getDelta());
    d.rollback();
  }
}
TOP

Related Classes of org.jugile.daims.DeltaTest

TOP
Copyright © 2018 www.massapi.com. 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.