Пример #1
0
        public void InMemoryBook_CalculatesAnAvverageGrade()
        {
            //arrange переменные
            var book = new InMemoryBook("");

            book.AddObjectGrade("A");
            book.AddObjectGrade("B");
            book.AddObjectGrade("C");

            //act вычисления
            var result = book.GetStatistics();

            //assert утверждение
            Assert.Equal(85.6, result.Average, 1);
            Assert.Equal(90.5, result.High, 1);
            Assert.Equal(77.3, result.Low, 1);
            Assert.Equal('B', result.Letter);
        }