Package org.jugile.util

Examples of org.jugile.util.Time


 
  public void testCopy() {
    Person p = (Person)Bo.createNew(Person.class);
    p.setName("Jukka");
    p.setAge(40);
    p.setTs(new Time("21.06.1971"));
    assertEquals("Jukka",p.getName());
    assertEquals(40,p.getAge());
    assertEquals(new Time("21.06.1971"),p.getTs());

    UnitOfWork uow = DomainCore.getUnitOfWork();
    Family f = (Family)uow.createNewBo(Family.class);
    f.setName("Rahkonen");
    p.setFamily(f);
    assertEquals("Rahkonen",p.getFamily().getName());
   
    print("p: " +p);

    Person p2 = (Person)p.copy(p.bi());
    assertEquals("Jukka",p2.getName());
    assertEquals(40,p2.getAge());
    assertEquals(new Time("21.06.1971"),p2.getTs());
    assertEquals("Rahkonen",p2.getFamily().getName());

    assertNotSame(p,p2);
    assertEquals(p,p2); // TODO: should copy be equal to origin?
    assertFalse(p == p2);
View Full Code Here

TOP

Related Classes of org.jugile.util.Time

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.