public void ComputeLowestGrade() { GradeBook grades = new GradeBook(); grades.Add(10.5f); grades.Add(90.5f); GradeStatistics result = grades.ComputeStatistics(); Assert.AreEqual(50.5, result.AverageGrade); }
public void ComputeHighestGrade() { GradeBook grades = new GradeBook(); grades.Add(10); grades.Add(90); GradeStatistics result = grades.ComputeStatistics(); Assert.AreEqual(90, result.HighestGrade); }
public void LetterGradeFDescriptionTest() { var grades = new GradeBook(); grades.Add(40); grades.Add(50); grades.Add(44); var stats = grades.ComputeStatistics(); Assert.AreEqual("Fail", stats.Description); }
public void LetterGradeDDescriptionTest() { var grades = new GradeBook(); grades.Add(60); grades.Add(60); grades.Add(65); var stats = grades.ComputeStatistics(); Assert.AreEqual("Average", stats.Description); }
public void LetterGradeCDescriptionTest() { var grades = new GradeBook(); grades.Add(70); grades.Add(70); grades.Add(75); var stats = grades.ComputeStatistics(); Assert.AreEqual("Good", stats.Description); }
public void LetterGradeADescriptionTest() { var grades = new GradeBook(); grades.Add(99); grades.Add(99); grades.Add(99); var stats = grades.ComputeStatistics(); Assert.AreEqual("Excellent", stats.Description); }
public void LetterGradeFTest() { var grades = new GradeBook(); grades.Add(40); grades.Add(50); grades.Add(44); var stats = grades.ComputeStatistics(); Assert.AreEqual("F", stats.LetterGrade); }
public void LetterGradeDTest() { var grades = new GradeBook(); grades.Add(60); grades.Add(60); grades.Add(65); var stats = grades.ComputeStatistics(); Assert.AreEqual("D", stats.LetterGrade); }
public void ComputeWhenZeroGrade() { GradeBook grades = new GradeBook(); grades.Add(0); grades.Add(0); GradeStatistics result = grades.ComputeStatistics(); Assert.AreEqual(0, result.HighestGrade); Assert.AreEqual(0, result.AverageGrade); Assert.AreEqual(0, result.LowestGrade); }