Skip to content

Instantly share code, notes, and snippets.

@mohashari
Created September 11, 2019 06:48
Show Gist options
  • Select an option

  • Save mohashari/6645349f126b93c5f91b7b45ed13d598 to your computer and use it in GitHub Desktop.

Select an option

Save mohashari/6645349f126b93c5f91b7b45ed13d598 to your computer and use it in GitHub Desktop.
@Test
public void whenSetRating_Then_RatingDetail_Total_Increment() {
reviewItem = new ReviewItem(5);
review.addReviewItem(reviewItem);
assertAll(
() -> assertEquals(1, review.findRatingDetailByRatingGroup(5).getTotal(), 0),
() -> assertNotEquals(1, review.findRatingDetailByRatingGroup(2).getTotal(), 0),
() -> {
reviewItem = new ReviewItem(5);
review.addReviewItem(reviewItem);
assertEquals(2,review.findRatingDetailByRatingGroup(5).getTotal(),0);
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment