Example #1
0
        public void AddGradeTest()
        {
            // Arrange: Hardcoded assignmentid and built object like the function would normally get
            dynamic TestObj = new JObject();

            TestObj.StudentID         = 48;
            TestObj.SSN               = MockFactory.SSN_OTTAR;
            TestObj.AssignmentGrade   = 9.5;
            TestObj.LateHandinPenalty = "True";
            var assignmentid = 3333;

            // Act: Get all the grades and add them
            _service.AddGrade(TestObj, assignmentid);
            var result = _service.GetGradeFunc(3333, 48);

            // Assert: Check if the grade gets made
            Assert.IsNotNull(result);
        }