Package org.springframework.springfaces.traveladvisor.domain

Examples of org.springframework.springfaces.traveladvisor.domain.RatingCount


  }

  @Test
  public void shouldGetReviewSummary() throws Exception {
    List<RatingCount> ratingCounts = new ArrayList<RatingCount>();
    ratingCounts.add(new RatingCount(Rating.EXCELLENT, 10));
    ratingCounts.add(new RatingCount(Rating.AVERAGE, 9));
    ratingCounts.add(new RatingCount(Rating.GOOD, 8));
    given(hotelSummaryRepository.findRatingCounts(hotel)).willReturn(ratingCounts);
    ReviewsSummary summary = hotelService.getReviewSummary(hotel);
    assertThat(summary.getNumberOfReviewsWithRating(Rating.EXCELLENT), is(10L));
    assertThat(summary.getNumberOfReviewsWithRating(Rating.AVERAGE), is(9L));
    assertThat(summary.getNumberOfReviewsWithRating(Rating.GOOD), is(8L));
View Full Code Here

TOP

Related Classes of org.springframework.springfaces.traveladvisor.domain.RatingCount

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.