Package it.hotel.model.hotel

Examples of it.hotel.model.hotel.Hotel


  }
 
 
  public void testGetType() {
   
    Hotel hotel = addHotel("en");
   
    String className= hotel.getType();
   
    assertEquals(className, "Hotel");   
  }
View Full Code Here


 
    public void testCreateHotelWithGallery() {
   
    localizedHotelManager.add(hotel1);
     
    Hotel hotel2= (Hotel) localizedHotelManager.get(hotel1.getId());
   
    Gallery gallery1 = (Gallery) galleryRawManager.get(hotel1.getGallery().getId());
   
    assertEquals(gallery1.getId(), hotel1.getGallery().getId());
   
View Full Code Here

  }
 
  public void testRemoveHotel() {
   
   
    Hotel hotel = new Hotel();
   
    localizedHotelManager.add(hotel);
   
        Gallery gallery = hotel.getGallery();
   
    Hotel hotel2 = (Hotel) localizedHotelManager.get(hotel.getId());
   
    int galleryId = hotel.getGallery().getId();
   
    Gallery gallery2 = (Gallery) galleryRawManager.get(galleryId);
   
View Full Code Here

 
 
  public void testRemoveHotelWithPhoto() {
   
   
        Hotel hotel = new Hotel();
       
        Photo photo = new Photo();
   
    localizedHotelManager.add(hotel);
   
        Gallery gallery = hotel.getGallery();
       
        gallery.addNewPhoto(photo);
       
        photo.setGallery(gallery);
   
    Hotel hotel2 = (Hotel) localizedHotelManager.get(hotel.getId());
   
    localizedHotelManager.remove(hotel);
   
    Gallery gallery2 = (Gallery) galleryManager.get(hotel2.getGallery().getId());
   
    assertNull(gallery2)
       
  }
View Full Code Here

 
  public void testUpDateHotel() {
   
    Gallery gallery = new Gallery();
   
    Hotel hotel = new Hotel();
   
    gallery.setStructure(hotel);
   
    localizedHotelManager.add(hotel);
   
    galleryManager.add(gallery);
   
    int galleryId = gallery.getId();
   
    hotel.setAddress("address");
   
    localizedHotelManager.add(hotel);
   
    int galleryId2 = gallery.getId();
   
View Full Code Here

 
 
  public void testVerifyOneToOneBetweenHotelAndGallery() {
   
       
    Hotel hotel = new Hotel();
   
    Gallery gallery = hotel.getGallery();
   
    gallery.setStructure(hotel);
   
    localizedHotelManager.add(hotel);
   
    Hotel hotel2 = (Hotel) localizedHotelManager.get(hotel.getId());
   
    assertEquals(hotel2.getGallery(), hotel.getGallery());
   
    Gallery gallery2 = (Gallery) galleryRawManager.get(hotel.getGallery().getId());
   
    assertEquals(hotel, gallery2.getStructure());
     
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.