Example #1
0
        public void RoundGrade_NotPassed_ShouldReturnSameValue()
        {
            //Arrange
            var grades = new List <int>()
            {
                0, 1, 2, 3, 9, 11, 26, 33, 37
            };
            var expected = new List <int>()
            {
                0, 1, 2, 3, 9, 11, 26, 33, 37
            };

            //Act
            var actual = GradingStudent.RoundGrade(grades);

            //Assert
            Assert.Equal(expected, actual);
        }
Example #2
0
        public void RoundGrade_PassedAndDifOfMultipleNumberAndGradeMorethan2_ShouldNotRound()
        {
            //Arrange
            var grades = new List <int>()
            {
                40, 41, 52, 91, 97
            };
            var expected = new List <int>()
            {
                40, 41, 52, 91, 97
            };

            //Act
            var actual = GradingStudent.RoundGrade(grades);

            //Assert
            Assert.Equal(expected, actual);
        }
Example #3
0
        public void RoundGrade_PassedAndDifOfMultipleNumberAndGradeLessThan3_ShouldRoundUp()
        {
            //Arrange
            var grades = new List <int>()
            {
                38, 39, 43, 44, 53, 98, 99
            };
            var expected = new List <int>()
            {
                40, 40, 45, 45, 55, 100, 100
            };

            //Act
            var actual = GradingStudent.RoundGrade(grades);

            //Assert
            Assert.Equal(expected, actual);
        }
Example #4
0
        public void FindMultiNumber_ShouldGetMultiNumber(int number, int expected)
        {
            var actual = GradingStudent.FindMultiNumber(number);

            Assert.Equal(expected, actual);
        }