Examples of Booking


Examples of it.hotel.model.booking.Booking

  }
 
 
public void testGetTotalBooking() throws Exception {
   
    Booking b = (Booking) bookingRawManager.get(b2.getId());
    assertNotNull(b);
     ConfirmedBooking confirmed= bookingRawManager.checkIn(b);
     assertNotNull(confirmed);
    
     confirmed.addServices(s);
View Full Code Here

Examples of it.hotel.model.booking.Booking

   
  }
 
  public void testCompletedBooking() throws Exception {
   
    Booking b = (Booking) bookingRawManager.get(bf.getId());
    assertNotNull(b);
   
     ConfirmedBooking confirmed= bookingRawManager.checkIn(b);
     assertNotNull(confirmed);
   
View Full Code Here

Examples of it.hotel.model.booking.Booking

   
  }
 
  public void testRemove() throws Exception {
   
    Booking b1 = (Booking) bookingRawManager.get(b.getId());
    assertNotNull(b1);
    int id = b1.getId();
    bookingRawManager.remove(id);
    Booking c = (Booking) bookingRawManager.get(id);
    assertNull(c);
  }
View Full Code Here

Examples of it.hotel.model.booking.Booking

    assertNull(c);
  }
 
  public void testGetBooking() throws Exception {

    Booking b1 = (Booking) bookingRawManager.get(b.getId());

    assertEquals(2, 2);
   
   
    assertNotNull(b1);
    assertEquals(b1.getAccomodation(),"PN");
    assertEquals(b1.getBeginDate(),CalendarUtils.GetGregorianCalendar("11/02/2009"));
 
    assertEquals(b1.getClass(), Booking.class);
    assertEquals(b1.getCustomer().getId(),c.getId());
    assertEquals(b1.getFinishDate(),CalendarUtils.GetGregorianCalendar("14/02/2009"));
 
   
    assertEquals(b1.getStructure().getId(),hotel2.getId());
    assertEquals(b1.getRoom().getId(), r.getId());
    assertEquals(b1.getType(),"BOOKING");
   
  }
View Full Code Here

Examples of it.hotel.model.booking.Booking

  public void testGetAll() throws Exception {
 
    int size;
    size= bookingRawManager.getAll().size();
   
    b = new Booking();
    b.setCustomer(c);
    b.setStructure(hotel2);
    b.setRoom(r);
    b.setBeginDate(CalendarUtils.GetGregorianCalendar("11/02/2009"));
    b.setFinishDate(CalendarUtils.GetGregorianCalendar("14/02/2009"));
View Full Code Here

Examples of it.hotel.model.booking.Booking

//   
  }
 
  public void testSave() throws Exception {
   
    Booking c = (Booking) bookingRawManager.get(b.getId());
    assertNotNull(c);
    assertEquals(c.getBeginDate(),b.getBeginDate());
  }
View Full Code Here

Examples of it.hotel.model.booking.Booking

    List<Booking> bookings = smsManager.parse(message);
    for (Booking booking : bookings){
      bookingManager.add(booking);
    }
   
    Booking booking = bookings.get(0);
   
    hotelName = booking.getHotel().getName();
   
    if(customerPhoneNumber != null)
    {
      boolean answer = smsManager.smsResponse(customerPhoneNumber);
    }
View Full Code Here

Examples of it.hotel.model.booking.Booking

   * @return
   */
  public ModelAndView delete(HttpServletRequest req, HttpServletResponse resp){
    try {
      int id = Integer.parseInt(req.getParameter("id"));
      Booking booking=(Booking) bookingManager.get(id);
      if(booking.getType().compareTo("UNCONFIRMED")==0)
      {
        bookingManager.remove(id);
       
          return this.listUnconfirmed(req, resp);

View Full Code Here

Examples of it.hotel.model.booking.Booking

      id = Integer.parseInt(req.getParameter("id"));
    } catch (Exception e){
      return new ModelAndView("hotel.404");
    }
   
    Booking booking = (Booking) bookingManager.get(id);
    if (booking == null)
    {
      return this.list(req, resp);
    }
     
View Full Code Here

Examples of it.hotel.model.booking.Booking

   * @return
   */
  public ModelAndView editCheckin(HttpServletRequest req, HttpServletResponse resp) {
    String id= req.getParameter("id");
    if(id != null){
      Booking booking = (Booking)bookingManager.get(Integer.parseInt(id));
      Customer customer = booking.getCustomer();
      BookingDTO bookingDTO = new BookingDTO(booking);
     
      req.setAttribute("booking", bookingDTO);
      ArrayList<Structure>  hotels = new  ArrayList<Structure>();
      hotels.add(booking.getStructure());
      req.setAttribute("hotels", hotels);
     
      return new ModelAndView("hotel.booking.BookingCheckinNew", "customer", customer);
    }
    return list(req, resp);
View Full Code Here
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.