コード例 #1
0
        public void ComputeLowestGrade()
        {
            GradeBook book = new GradeBook();

            book.AddGrade(10);
            book.AddGrade(90);

            GradeBookStats results = book.ComputeStatistics();

            Assert.AreEqual(10, results.LowestGrade);
        }
コード例 #2
0
        public void ComputeAverage()
        {
            GradeBook book = new GradeBook();

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

            GradeBookStats results = book.ComputeStatistics();

            Assert.AreEqual(85.16667, results.AverageGrade, 0.01);
        }