Examples of ReviewsSummary


Examples of org.springframework.springfaces.traveladvisor.service.ReviewsSummary

    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));
    assertThat(summary.getNumberOfReviewsWithRating(Rating.POOR), is(0L));
  }
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.