Created
September 11, 2019 06:48
-
-
Save mohashari/6645349f126b93c5f91b7b45ed13d598 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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