Exemple #1
0
        public void GetFinalRating_ShouldReturnCorrectResult(double average, int expectedRating)
        {
            IStudentGradesAverageService studentGradesAverageService = new StudentsGradesAverageServiceMock((decimal)average);
            var serviceUnder = new StudentsFinalRatingService(studentGradesAverageService);

            var result = serviceUnder.GetFinalRating(null);

            Assert.AreEqual(result, expectedRating);
        }
Exemple #2
0
        public void GetFinalRatingShouldReturnCorrectResult(double average, int expectedResult)
        {
            //Arrange
            studentsGradesAverageServiceMock.Setup(s => s.Calculate(null)).Returns((decimal)average);
            //Act
            var result = serviceUnderTests.GetFinalRating(null);

            //Assert
            Assert.Equal(expectedResult, result);
        }