コード例 #1
0
        public void GradeSubmissionTrivialFailure()
        {
            var db = Utils.MakeMockDatabase();

            var controller = MakeController(db);

            string uid = StudentControllerTests.AddOneStudent(db);

            uint cid = AddCourseAndClass(db);

            Enroll(uid, cid, db);

            AddAssignmentAndCategory(cid, db);

            // no submission

            db.SaveChanges();

            var jsonResult = controller.GradeSubmission("CS", 3550, "Spring", 2019,
                                                        "Quizzes", "Bonus Quiz", uid, 79) as JsonResult;

            Assert.False(Utils.ResultSuccessValue(jsonResult));
        }