public void CalculateStatistics() { GradeBook.Book b = new GradeBook.Book(""); b.AddGrade(11.0); b.AddGrade(12.0); b.AddGrade(13.0); Statistics s = b.getStatistics(); Assert.Equal(12, s.Average); Assert.Equal(13, s.High); Assert.Equal(11, s.Low); }
public void TestGradeBook() { //arrange var book = new GradeBook.Book("C++"); book.AddBookGrade(1.33); book.AddBookGrade(5.33); book.AddBookGrade(3.33); //act var result = book.ShowStaticstic(); //assert Assert.Equal(5.333, result, 2); }