Package org.jugile.daims

Source Code of org.jugile.daims.ExamplesTest

package org.jugile.daims;

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

public class ExamplesTest extends JugileTestCase {
 
  public void testDemo1() {
   
    Domain d = Domain.getDomain();
    Person p1 = d.createPerson().setName("Bart Simpson").setAge(12).setTs(new Time("21.06.1971"));
    long id = p1.id();
    d.commit();
   
    p1 = d.getPerson(id);
    assertNotNull(p1);
    String name = p1.getName();
    assertEquals("Bart Simpson", name);
   
    d.rollback();
  }
 
  public void testDelete() {
    Domain d = Domain.getDomain();
    for (Person p : d.getPersons()) p.delete();
    d.commit();
  }
 
 
}
TOP

Related Classes of org.jugile.daims.ExamplesTest

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.