예제 #1
0
        public void BookReturnsAverageGrade()
        {
            // arrange
            var book = new InMemoryBook("Test Book");

            book.AddGrade(99.9);
            book.AddGrade(49.3);
            book.AddGrade(39.3);
            book.AddGrade(29.3);
            book.AddGrade(19.3);
            var expected = 47.42;

            // act
            var actual = book.GetGradeAverage();

            // assert
            Assert.Equal(actual, expected);
        }