示例#1
0
 @Test
 @Ignore
 public void testInsert() throws Exception {
   Patient patient = entityManager.find(Patient.class, 3);
   appointment =
       new Appointment(entityManager)
           .setStart(new DateTime(Calculate.getCal(2013, 02, 18, 8, 48, 48)))
           .setEnd(new DateTime(FormatText.USER_DATETIME.parse("02/18/2013 10:48:48")));
   patient.addAppointment(appointment);
 }
示例#2
0
 @Test
 public void testActiveOn() throws Exception {
   Appointment app =
       new Appointment(null)
           .setStart(new DateTime(Calculate.getCal(2013, 02, 18, 8, 48, 48)))
           .setEnd(new DateTime(FormatText.USER_DATETIME.parse("02/18/2013 10:48:48")));
   assertTrue(app.isActiveOnDay(Calculate.getCal(2013, 02, 18).getTime()));
   assertFalse(app.isActiveOnDay(Calculate.getCal(2013, 02, 19).getTime()));
   assertFalse(app.isActiveOnDay(Calculate.getCal(2013, 02, 17).getTime()));
   app.setEnd(new DateTime(FormatText.USER_DATETIME.parse("02/19/2013 08:48:48")));
   assertTrue(app.isActiveOnDay(Calculate.getCal(2013, 02, 18).getTime()));
   assertTrue(app.isActiveOnDay(Calculate.getCal(2013, 02, 19).getTime()));
   assertFalse(app.isActiveOnDay(Calculate.getCal(2013, 02, 17).getTime()));
   assertFalse(app.isActiveOnDay(Calculate.getCal(2013, 02, 20).getTime()));
 }
示例#3
0
 public static boolean isNull(Object... keys) {
   for (Object k : keys) if (Calculate.isNull(k)) return true;
   return false;
 }
示例#4
0
 public static boolean isSame(Object o, Object o2) {
   return Calculate.isSame(o, o2);
 }