예제 #1
0
        public void ValidInputForGradeConversion(int percentage, int expected)
        {
            IGradeSystem gradeSystem = new GradeSystem();

            gradeSystem.ToGrade(percentage);
            Assert.Equal(expected, gradeSystem.Result);
        }
예제 #2
0
        public void OutOfRangeForGradeConversionExpectingArgumentException(int percentage)
        {
            IGradeSystem gradeSystem = new GradeSystem();

            Assert.Throws <ArgumentException>(() =>
            {
                gradeSystem.ToGrade(percentage);
            });
        }