Package org.jugile.daims

Source Code of org.jugile.daims.ConcurrencyTest

package org.jugile.daims;

import org.jugile.proto2.domain.Domain;
import org.jugile.proto2.domain.Person;
import org.jugile.util.JugileTestCase;

public class ConcurrencyTest extends JugileTestCase {
 
  public void testCommitAfterRollback() {
    Domain d = Domain.getDomain();
    d.rollback();
    d.commit();
  }
 
  public void testCommitAndRollback() {
    Domain d = Domain.getDomain();
    Person p = d.createPerson();
    assertNotNull(p);
    d.commit();
   
    p = d.getPerson(p.id());
    d.commit();
    d.commit();
    d.rollback();
    p = d.getPerson(p.id());
    d.rollback();
    d.commit();
  }
 
  public void testCreateAndDeleteSameObjects() {
//    Domain d = Domain.getDomain();
//    Person p = d.createPerson().setName("fi");
//    p.delete();
//    d.commit();
  }
}
TOP

Related Classes of org.jugile.daims.ConcurrencyTest

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.