Package it.hotel.model.hotel

Examples of it.hotel.model.hotel.Hotel


  }
 
public void testModelAndView() throws Exception {
  req.addParameter("id", "1")
  String idString = req.getParameter("id");
  Hotel hotel=expectedHotels.get(1);
  expect(structureManager.get(Integer.parseInt(idString))).andReturn(hotel);
  replay(structureManager);
    mvc = mapcontroller.handleRequest(req, resp);
  verify(structureManager);
 
View Full Code Here


    assertTrue(mvc.getModel().containsKey("typologies"));
  }

  public void testRoomSimpleFormCreate() throws Exception {
    Typology typology = new Typology();
    Hotel hotel=new Hotel();
    List<Hotel> expectedHotels = new ArrayList<Hotel> ();
    Room room= new Room();
    roomFormController.setSuccessView("hotel.Room.list.htm");
    expect(roomManager.add(isA(Room.class))).andReturn(true);
    expect(typologyManager.get(1)).andReturn(typology);
View Full Code Here

 
 
  public void setHotel() {
   
   
    hotel1=new Hotel();
    hotel1.setAddress("via garibaldi");
    hotel1.setBankaccount("76876587658687");
    hotel1.setBriefdescription("breve descrizione");
    hotel1.setCap("09800");
    hotel1.setCity("Cagliari");
View Full Code Here

 
 
  }
  public void testCustomerSimpleFormCreate() throws Exception {
 
  Hotel hotel=new Hotel();
  List<Typology> expectedTypologies = new ArrayList<Typology> ();
  List<Hotel> expectedHotels = new ArrayList<Hotel> ();
  roomFormController.setSuccessView("hotel.customer.list.htm");

  expect(customerManager.add(isA(Customer.class))).andReturn(true);
View Full Code Here

   
   
    public void testViewWithIDnonNull() throws SecurityException, NoSuchMethodException {
     
     
      Hotel hotel = new Hotel();
      hotel.setId(1);
     
      req.setMethod("GET");
      req.addParameter("locale", "en");
      req.addParameter("id", "1");
     
View Full Code Here

   
    MultiLingualInterceptor interceptor = new MultiLingualInterceptor();
    interceptor.setLabelManager(labelManager);
    interceptor.setLocaleContainer(localeContainer);
   
    Hotel h = new Hotel();
    h.setBriefdescription("Hotel.Briefdescription");
    h.setDescription("Hotel.Description");
    h.setId(1);
   
    Hotel h1 = new Hotel();
    h1.setBriefdescription("Hotel.Briefdescription");
    h1.setDescription("Hotel.Description");
    h1.setId(2);
   
    ArrayList<Hotel> hotellist = new ArrayList<Hotel>();
    hotellist.add(h);
    hotellist.add(h1);
   
    Label label = new Label();
    label.setCode("Hotel.Briefdescription");
    label.setId(1);
    label.setLanguage("it");
    label.setText("this is something");
   
    Label label2 = new Label();
    label2.setCode("Hotel.Briefdescription");
    label2.setId(2);
    label2.setLanguage("it");
    label2.setText("this is something else");
   
   
    HotelManager hmanager = new HotelManager();
    Class cls = HotelManager.class;
   
    Method m = cls.getMethod("getAll");
   
    expect(labelManager.getLabel(1, "Hotel.Briefdescription", "it")).andReturn(label);
    expect(labelManager.getLabel(1, "Hotel.Description", "it")).andReturn(label);
    expect(labelManager.getLabel(2, "Hotel.Briefdescription", "it")).andReturn(label2);
    expect(labelManager.getLabel(2, "Hotel.Description", "it")).andReturn(label2);
    expect(localeContainer.getLocale()).andReturn("it");
    expectLastCall().anyTimes();
   
    replay(localeContainer);
    replay(labelManager);
   
    Integer i = new Integer(1);
    try {
      interceptor.afterReturning(hotellist, m, null, hmanager)
    }catch (Throwable t){
      assertTrue(false);
    }
   
    assertEquals(h.getBriefdescription(),"this is something");
    assertEquals(h1.getBriefdescription(),"this is something else");
   
    verify(labelManager);
    verify(localeContainer);
   
   
View Full Code Here

    MultiLingualInterceptor interceptor = new MultiLingualInterceptor();
    interceptor.setLabelManager(labelManager);
    interceptor.setLocaleContainer(localeContainer);
   
   
    Hotel h = new Hotel();
    h.setBriefdescription("Hotel.Briefdescription");
    h.setDescription("Hotel.Description");
    h.setId(1);
   
    Room room = new Room();
    room.setId(1);
    room.setStructure(h);
   
View Full Code Here

 
 
  public void testGetClass() {
   
   
    Hotel hotel = new Hotel();
   
    Class clazz = hotel.getClass();
   
    String className = clazz.getName();
   
    String[] stringNames = className.split("\\.");
   
View Full Code Here

    MultiLingualInterceptor interceptor = new MultiLingualInterceptor();
    interceptor.setLabelManager(labelManager);
    interceptor.setLocaleContainer(localeContainer);
   
   
    Hotel h = new Hotel();
    h.setBriefdescription("Hotel.Briefdescription");
    h.setDescription("Hotel.Description");
    h.setId(1);
   
    Room room = new Room();
    room.setId(1);
    room.setStructure(h);
   
View Full Code Here

      dao = EasyMock.createMock(ITypologyDAO.class);
      manager.setDAO(dao);
      o = new Typology();
      o1 = new Typology();
      lista= new ArrayList<Typology>();
      hotel=new Hotel();
      hotel.setId(1);
   
   
  }
View Full Code Here

TOP

Related Classes of it.hotel.model.hotel.Hotel

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.