Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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
        }