Ejemplo n.º 1
0
        public void TestForAverageGradeIfThereAreNoGrades()
        {
            double[]    grades1    = Array.Empty <double>();
            string      className1 = "Math";
            SchoolClass class1     = new SchoolClass(className1, grades1);

            Assert.Equal(0, class1.GetAverageGrade());
        }
Ejemplo n.º 2
0
        public void TestForAverageGrade()
        {
            double[]    grades1    = { 8, 10 };
            string      className1 = "Math";
            SchoolClass class1     = new SchoolClass(className1, grades1);

            Assert.Equal(9, class1.GetAverageGrade());
        }
Ejemplo n.º 3
0
        public void TestForAddingGrade()
        {
            double[]    grades1    = { 4, 4 };
            string      className1 = "Math";
            SchoolClass class1     = new SchoolClass(className1, grades1);

            class1.AddGrade(10);
            Assert.Equal(6, class1.GetAverageGrade());
        }