Package org.openmeetings.app.data.calendar.daos

Examples of org.openmeetings.app.data.calendar.daos.AppointmentDaoImpl


    super(name);
  }
 
  final public void testAppointmentDaoImpl() throws Exception
  {
    AppointmentDaoImpl appDaoImpl = AppointmentDaoImpl.getInstance();
    assertNotNull("Cann't access to appointment dao implimentation", appDaoImpl);
   
    // add new appointment
    Appointment ap = new Appointment();
   
    ap.setAppointmentName("appointmentName");
    ap.setAppointmentLocation("appointmentLocation");
   
    Date appointmentstart = new Date();
    Date appointmentend = new Date();
    appointmentend.setTime(appointmentstart.getTime() + 3600);
   
    ap.setAppointmentStarttime(appointmentstart);
     ap.setAppointmentEndtime(appointmentend);
    ap.setAppointmentDescription("appointmentDescription");
    ap.setStarttime(new Date());
    ap.setDeleted("false");
    ap.setIsDaily(false);
    ap.setIsWeekly(false);
    ap.setIsMonthly(false);
    ap.setIsYearly(false);
    ap.setIsPasswordProtected(false);

    ap.setUserId(UsersDaoImpl.getInstance().getUser(1L));
    ap.setIsConnectedEvent(false);
    Long id = appDaoImpl.addAppointmentObj(ap);
    assertNotNull("Cann't add appointment", id);
   
    // get appointment
    ap = appDaoImpl.getAppointmentById(id);
    assertNotNull("Cann't get appointment", ap);
   
    id = appDaoImpl.deleteAppointement(id);
    assertNotNull("Cann't delete appointment", id);
  }
View Full Code Here


public class TestUtils extends Assert {

  public static Appointment createAppointment()
  {
    AppointmentDaoImpl appDaoImpl = AppointmentDaoImpl.getInstance();
    assertNotNull("Cann't access to appointment dao implimentation", appDaoImpl);
   
    // add new appointment
    Appointment ap = new Appointment();
   
    ap.setAppointmentName("appointmentName");
    ap.setAppointmentLocation("appointmentLocation");
   
    Date appointmentstart = new Date();
    Date appointmentend = new Date();
    appointmentend.setTime(appointmentstart.getTime() + 3600);
   
    ap.setAppointmentStarttime(appointmentstart);
     ap.setAppointmentEndtime(appointmentend);
    ap.setAppointmentDescription("appointmentDescription");
    ap.setStarttime(new Date());
    ap.setDeleted("false");
    ap.setIsDaily(false);
    ap.setIsWeekly(false);
    ap.setIsMonthly(false);
    ap.setIsYearly(false);
    ap.setIsPasswordProtected(false);
 
    ap.setUserId(UsersDaoImpl.getInstance().getUser(1L));
    ap.setIsConnectedEvent(false);
    Long id = appDaoImpl.addAppointmentObj(ap);
    assertNotNull("Cann't add appointment", id);
    return ap;
  }
View Full Code Here

TOP

Related Classes of org.openmeetings.app.data.calendar.daos.AppointmentDaoImpl

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.