Examples of Hotel


Examples of br.com.hotel.domain.Hotel

    brokers.add(broker1);
    brokers.add(broker2);

    List<Hotel> hotelsBroker1 = new ArrayList<>();
    hotelsBroker1.add(new Hotel("broker1-hotel1", 3));
    hotelsBroker1.add(new Hotel("broker1-hotel2", 1));
    hotelsBroker1.add(new Hotel("broker1-hotel3", 3));
    hotelsBroker1.add(new Hotel("broker1-hotel4", 5));


    List<Hotel> hotelsBroker2 = new ArrayList<>();
    hotelsBroker1.add(new Hotel("broker2-hotel1", 3));
    hotelsBroker1.add(new Hotel("broker2-hotel2", 1));
    hotelsBroker1.add(new Hotel("broker2-hotel3", 3));
    hotelsBroker1.add(new Hotel("broker2-hotel4", 5));


    // TODO: em relação ao broken filter no momento pode ser qualquer um
    // pelo fato de se trata de uma poc de arquitetura e nao temos nada
    // definido ainda em relacao aos parametros de consulta nos brokens..
View Full Code Here

Examples of com.github.jmkgreen.morphia.testmodel.Hotel

  }
 
    @Test
    public void testEmbedded() throws Exception {
      ds.delete(ds.createQuery(Hotel.class));
        Hotel borg = Hotel.create();
        borg.setName("Hotel Borg");
        borg.setStars(4);
        borg.setTakesCreditCards(true);
        borg.setStartDate(new Date());
        borg.setType(Hotel.Type.LEISURE);
        Address borgAddr = new Address();
        borgAddr.setStreet("Posthusstraeti 11");
        borgAddr.setPostCode("101");
        borg.setAddress(borgAddr);

       
        ds.save(borg);
        assertEquals(1, ds.getCount(Hotel.class));
        assertNotNull(borg.getId());

        Hotel hotelLoaded = ds.get(Hotel.class, borg.getId());
        assertEquals(borg.getName(), hotelLoaded.getName());
        assertEquals(borg.getAddress().getPostCode(), hotelLoaded.getAddress().getPostCode());
    }
View Full Code Here

Examples of com.tap5.hotelbooking.entities.Hotel

        users.add(new User("Christophe Cordenier", "cordenier", "ccordenier@example.com",
                "cordenier"));
        users.add(new User("Katia Aresti", "karesti", "karesti@example.com", "karesti"));

        hotels.add(new Hotel(129, 3, "Marriott Courtyard", "Tower Place, Buckhead", "Atlanta",
                "GA", "30305", "USA"));

        hotels.add(new Hotel(84, 4, "Doubletree Atlanta-Buckhead", "3342 Peachtree Road NE",
                "Atlanta", "GA", "30326", "USA"));

        hotels.add(new Hotel(289, 4, "W New York - Union Square", "201 Park Avenue South",
                "New York", "NY", "10003", "USA"));

        hotels.add(new Hotel(219, 3, "W New York", "541 Lexington Avenue", "New York", "NY",
                "10022", "USA"));

        hotels.add(new Hotel(250, 3, "Hotel Rouge", "1315 16th Street NW", "Washington", "DC",
                "20036", "USA"));

        hotels.add(new Hotel(159, 4, "70 Park Avenue Hotel", "70 Park Avenue, 38th St", "New York",
                "NY", "10016", "USA"));

        hotels.add(new Hotel(198, 4, "Parc 55", "55 Cyril Magnin Street", "San Francisco", "CA",
                "94102", "USA"));

        hotels.add(new Hotel(189, 4, "Conrad Miami", "1395 Brickell Ave", "Miami", "FL", "33131",
                "USA"));

        hotels.add(new Hotel(111, 4, "Grand Hyatt", "345 Stockton Street", "San Francisco", "CA",
                "94108", "USA"));

        hotels.add(new Hotel(54, 1, "Super 8 Eau Claire Campus Area", "1151 W MacArthur Ave",
                "Eau Claire", "WI", "54701", "USA"));

        hotels.add(new Hotel(199, 4, "San Francisco Marriott", "55 Fourth Street", "San Francisco",
                "CA", "94103", "USA"));

        hotels.add(new Hotel(543, 4, "Hilton Diagonal Mar", "Passeig del Taulat 262-264",
                "Barcelona", "Catalunya", "08019", "ES"));

        hotels.add(new Hotel(335, 5, "Hilton Tel Aviv", "Independence Park", "Tel Aviv", null,
                "63405", "IL"));

        hotels.add(new Hotel(242, 5, "InterContinental Hotel Tokyo Bay", "1-15-2 Kaigan", "Tokyo",
                "Minato", "105", "JP"));

        hotels.add(new Hotel(130, 4, "Hotel Beaulac", " Esplanade Léopold-Robert 2", "Neuchatel",
                null, "2000", "CH"));

        hotels.add(new Hotel(266, 5, "Conrad Treasury Place", "130 William Street", "Brisbane",
                "QL", "4001", "AU"));

        hotels.add(new Hotel(170, 4, "Ritz-Carlton Montreal", "1228 Sherbrooke St West",
                "Montreal", "Quebec", "H3G1H6", "CA"));

        hotels.add(new Hotel(179, 4, "Ritz-Carlton Atlanta", "181 Peachtree St NE", "Atlanta",
                "GA", "30303", "USA"));

        hotels.add(new Hotel(145, 4, "Swissotel Sydney", "68 Market Street", "Sydney", "NSW",
                "2000", "AU"));

        hotels.add(new Hotel(178, 4, "Melié White House", "Albany Street Regents Park", "London",
                null, "NW13UP", "GB"));

        hotels.add(new Hotel(159, 3, "Hotel Allegro", "171 W Randolph Street", "Chicago", "IL",
                "60601", "USA"));

        hotels.add(new Hotel(296, 5, "Caesars Palace", "3570 Las Vegas Blvd S", "Las Vegas", "NV",
                "89109", "USA"));

        hotels.add(new Hotel(300, 4, "Mandalay Bay Resort & Casino", "3950 Las Vegas Blvd S",
                "Las Vegas", "NV", "89119", "USA"));

        hotels.add(new Hotel(100, 2, "Hotel Cammerpoorte", "Nationalestraat 38-40", "Antwerp",
                null, "2000", "BE"));

        LOGGER.info("-- Loading initial demo data");
        create(users);
        create(hotels);
View Full Code Here

Examples of eja.ejb.entities.Hotel

    public Collection<Category> getAllCategories() {
        return this._categoryDao.getAllCategories();
    }

    public String edit() {
        this._hotel = (this.id != 0) ? this._hotelDao.getHotelById(this.id) : new Hotel();
        this._hotel.setName(this.name);
        this._hotel.setEmail(this.email);
        this._hotel.setPhone(this.phone);
        this._hotel.setComRegNo(this.comRegNo);
        this._hotel.setVatNo(this.vatNo);
View Full Code Here

Examples of eja.ejb.entities.Hotel

public class HotelConverter implements Converter {

    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        int id = Integer.parseInt(value);
        Hotel hotel = new Hotel();
        hotel.setId(id);

        return hotel;
    }
View Full Code Here

Examples of eja.ejb.entities.Hotel

        return hotel;
    }

    @Override
    public String getAsString(FacesContext context, UIComponent component, Object value) {
        Hotel hotel = (Hotel) value;
        return hotel.getId().toString();
    }
View Full Code Here

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

Examples of it.hotel.model.hotel.Hotel

   
   
   
   
    HotelValidator validator = new HotelValidator();
    Hotel hotel = new Hotel();
    validator.setType(hotel);
    hotelFormController.setValidator(validator);
   
    req.setMethod("POST");
    req.setRequestURI("http://localhost:8080/hotel/Hotel/new.htm");
    req.addParameter("name", "name");
    req.addParameter("companytype", "ltd");
    req.addParameter("address", "indirizzo");
    req.addParameter("city", "cagliari");
    req.addParameter("companytaxnumber", "iva");
    req.addParameter("codicefiscale", "codice");
    req.addParameter("telephone", "1");
    req.addParameter("fax", "fax");
    req.addParameter("province", "ca");
    req.addParameter("description", "descrizione");
    req.addParameter("briefdescription", "brevedescrizione");
    req.addParameter("image", "");
    req.addParameter("bankaccount", "2131239");
    req.addParameter("cap", "09020");
    req.addParameter("locale","en");
    req.addParameter("mail","mail@mail.com");
    req.addParameter("star", "2");
   
   
   
   
    expect(localeContainer.getLocale()).andReturn("it");
   
    localeContainer.setLocale("en");
   
   
   
    expect(structureManager.get(0)).andReturn(null);
    expect(structureManager.add(isA(Hotel.class))).andReturn(true);
    localeContainer.setLocale("it");
   
    replay(localeContainer);
    replay(structureManager);
   
    ModelAndView mvc = hotelFormController.handleRequest(req, resp);
   
    verify(localeContainer);
    verify(structureManager);
   
    assertModelAttributeAvailable(mvc, "hotel");
    Hotel hotel2 = (Hotel) mvc.getModelMap().get("hotel");
   
    assertNotNull(hotel2);
   
    assertTrue(hotel2.getName().equals("name"));
    assertTrue(hotel2.getCompanytype().equals("ltd"));
    assertTrue(hotel2.getAddress().equals("indirizzo"));
    assertTrue(hotel2.getCity().equals("cagliari"));
    assertTrue(hotel2.getCompanytaxnumber().equals("iva"));
    assertTrue(hotel2.getCodicefiscale().equals("codice"));
    assertTrue(hotel2.getTelephone().equals("1"));
    assertTrue(hotel2.getFax().equals("fax"));
    assertTrue(hotel2.getProvince().equals("ca"));
    assertTrue(hotel2.getDescription().equals("descrizione"));
    assertTrue(hotel2.getBriefdescription().equals("brevedescrizione"));
    assertTrue(hotel2.getImageLink().equals("/hotel/Image/view.htm?type=hotel&id=0"));
    assertTrue(hotel2.getBankaccount().equals("2131239"));
    assertTrue(hotel2.getCap().equals("09020"));
    assertTrue(hotel2.getLocale().equals("en"));
    assertTrue(hotel2.getMail().equals("mail@mail.com"));
   
  }
View Full Code Here

Examples of it.hotel.model.hotel.Hotel

   */
  @Override
  protected Map referenceData (HttpServletRequest req) throws Exception{

    Map map = super.referenceData(req);
    Hotel hotel = new Hotel();
    map.put("structure", hotel);
    return map;
   
   
  }
View Full Code Here

Examples of it.hotel.model.hotel.Hotel

   
    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);
   
    HotelManager hmanager = new HotelManager();
    Class cls = HotelManager.class;
   
    Method m = cls.getMethod("get", new Class[] {int.class});
   
    expect(localeContainer.getLocale()).andReturn("it");
    expectLastCall().anyTimes();
   
    Label label = new Label();
    label.setCode("Hotel.Briefdescription");
    label.setId(1);
    label.setLanguage("it");
    label.setText("this is something");
   
    expect(labelManager.getLabel(1, "Hotel.Briefdescription", "it")).andReturn(label);
    expect(labelManager.getLabel(1, "Hotel.Description", "it")).andReturn(label);
   
   
    replay(localeContainer);
    replay(labelManager);
   
    Integer i = new Integer(1);
    try {
      interceptor.afterReturning(h, m, new Object[] {i}, hmanager)
    }catch (Throwable t){
      assertTrue(false);
    }
   
    assertEquals(h.getBriefdescription(),"this is something");
   
    verify(labelManager);
    verify(localeContainer);
   
  }
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.