Exemplo n.º 1
0
        public void ComputeLowestGrade()
        {
            ThrowAwayGradeBook book = new ThrowAwayGradeBook();

            book.AddGrades(10);
            book.AddGrades(90);

            GradeStatistics result = book.ComputeStatistics();

            Assert.AreEqual(10, result.LowestGrade);
        }
Exemplo n.º 2
0
        public void ComputeAverageGrade()
        {
            ThrowAwayGradeBook book = new ThrowAwayGradeBook();

            book.AddGrades(91);
            book.AddGrades(89.5f);
            book.AddGrades(75);

            GradeStatistics result = book.ComputeStatistics();

            Assert.AreEqual(85.16, result.AverageGrade, 0.01);
        }