Package it.hotel.controller.booking.DTO

Examples of it.hotel.controller.booking.DTO.SolutionBookingDTO


      prezzi[0] new BigDecimal(100);
      prezzi[1] new BigDecimal(100);
     
      Integer[] mapping = new Integer[]{0,1,0,0,0};
         
      SolutionBookingDTO soluzioneDisponibile = new SolutionBookingDTO(mapping ,prezzi);
      List<SolutionBookingDTO> soluzioniDisponibili = new ArrayList<SolutionBookingDTO>();
      soluzioniDisponibili.add(soluzioneDisponibile);
     
      SolutionHotelDTO soluzione1 =new SolutionHotelDTO(soluzioniDisponibili);
     
      assertEquals(soluzione1.getMinPrice(), soluzione.getMinPrice());
      assertEquals(soluzione1.getMaxPrice(), soluzione.getMaxPrice());
     
      SolutionBookingDTO bookingDto1 = soluzione1.getSolutions().get(0);
      SolutionBookingDTO bookingDto2 = soluzione.getSolutions().get(0);
     
      assertEquals(bookingDto1.getCombinationId(),bookingDto2.getCombinationId());
      assertEquals(bookingDto1.getMinPrice(),bookingDto2.getMinPrice());
      assertEquals(bookingDto1.getMaxPrice(),bookingDto2.getMaxPrice());
     
        Integer[] combinationCamere1 = bookingDto1.getCombinationCamere();
      Integer[] combinationCamere2 = bookingDto2.getCombinationCamere();
     
      assertEquals(combinationCamere1[0], combinationCamere2[0]);
      assertEquals(combinationCamere1[1], combinationCamere2[1]);
      assertEquals(combinationCamere1[2], combinationCamere2[2]);
      assertEquals(combinationCamere1[3], combinationCamere2[3]);
View Full Code Here


      BigDecimal prezzi[] = new BigDecimal[2];
      prezzi[0] new BigDecimal(100);
      prezzi[1] new BigDecimal(100);
      Integer[] mapping = new Integer[]{0,1,0,0,0};
      SolutionBookingDTO soluzioneDisponibile = new SolutionBookingDTO(mapping ,prezzi);
      List<SolutionBookingDTO> soluzioniDisponibili = new ArrayList<SolutionBookingDTO>();
      soluzioniDisponibili.add(soluzioneDisponibile);
     
      SolutionHotelDTO soluzione1 =new SolutionHotelDTO(soluzioniDisponibili);
     
      criteriaResult2 = new HashMap<Hotel,List>();
      criteriaResult2.put(hotel2, soluzione1);
     
      criteriaResult1 = bookingRawManager.getSolutionsFromCriteria(dto, CalendarUtils.GetToday(), CalendarUtils.GetToday());
     
      assertTrue(criteriaResult1.size()==criteriaResult2.size());
     
      Set<Hotel> setResult1 = criteriaResult1.keySet();
      Set<Hotel> setResult2 = criteriaResult2.keySet();
     
      assertTrue(setResult1.containsAll(setResult2) && (setResult1.size() == setResult2.size()));
     
       
      soluzione1 = (SolutionHotelDTO) criteriaResult1.get(hotel2);
     
     
      assertEquals(soluzione1.getMinPrice(), soluzione.getMinPrice());
      assertEquals(soluzione1.getMaxPrice(), soluzione.getMaxPrice());
     
      SolutionBookingDTO bookingDto1 = soluzione1.getSolutions().get(0);
      SolutionBookingDTO bookingDto2 = soluzione.getSolutions().get(0);
     
      assertEquals(bookingDto1.getCombinationId(),bookingDto2.getCombinationId());
      assertEquals(bookingDto1.getMinPrice(),bookingDto2.getMinPrice());
      assertEquals(bookingDto1.getMaxPrice(),bookingDto2.getMaxPrice());
     
        Integer[] combinationCamere1 = bookingDto1.getCombinationCamere();
      Integer[] combinationCamere2 = bookingDto2.getCombinationCamere();
     
      assertEquals(combinationCamere1[0], combinationCamere2[0]);
      assertEquals(combinationCamere1[1], combinationCamere2[1]);
      assertEquals(combinationCamere1[2], combinationCamere2[2]);
      assertEquals(combinationCamere1[3], combinationCamere2[3]);
View Full Code Here

    if(roomResult.size()>=rooms){
      List<Integer[]> combinations = helper.getFromRooms(rooms, persons);
      for(Integer[] combination : combinations){
        if(isCombinationAvailable(combination, roomsGroupedByBeds)){
          result.add(new SolutionBookingDTO(combination,this.getMinMaxPrices(combination, roomResult, begindate, finishdate)));
        }
      }
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of it.hotel.controller.booking.DTO.SolutionBookingDTO

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.