예제 #1
0
        public void NewRatingShouldGiveSameRatingIfNoRatingHasBeenSubmittedBefore()
        {
            var sut = new Beer();

            sut.AddNewRating(10);

            Assert.That(sut.Rating == 10);
        }
예제 #2
0
        public void NewRatingShouldGiveNewRatingPlusCurrentRatingDividedByTwo()
        {
            var sut = new Beer();

            sut.AddNewRating(5);
            sut.AddNewRating(6);

            Assert.That(sut.Rating == 5);

            sut.AddNewRating(10);

            Assert.That(sut.Rating == 7);

            sut.AddNewRating(9);

            Assert.That(sut.Rating == 8);
        }