public void ComputeLowestGrade() { ThrowAwayGradeBook book = new ThrowAwayGradeBook(); book.AddGrades(10); book.AddGrades(90); GradeStatistics result = book.ComputeStatistics(); Assert.AreEqual(10, result.LowestGrade); }
public void ComputesHighestGrade() { GradeBook book = new ThrowAwayGradeBook(); book.AddGrade(10); book.AddGrade(90); GradeStatistics result = book.ComputeStatistics(); Assert.AreEqual(90, result.HighestGrade); }
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); }