public void ComputeMinimalGrade() { var bookTest = new GradeBook(); bookTest.AddGrade(10.1f); bookTest.AddGrade(99.9f); var stat = bookTest.ComputeStatistic(); Assert.AreEqual(stat.MinGrade, 10.1f); }
public void ComputeHighestGrade() { var bookTest = new GradeBook(); bookTest.AddGrade(10.1f); bookTest.AddGrade(99.9f); var stat = bookTest.ComputeStatistic(); Assert.AreEqual(stat.MaxGrade, 99.9f); }
public void ComputeAverageGrade() { var bookTest = new GradeBook(); bookTest.AddGrade(91); bookTest.AddGrade(89.5f); bookTest.AddGrade(75); var stat = bookTest.ComputeStatistic(); Assert.AreEqual(stat.AvgGrade, 85.16f, 0.01); //0.01 delta ledziama paklaida }