コード例 #1
0
        public void AddAssignment()
        {
            // Arrange:
            AddAssignmentViewModel assignmentModel = new AddAssignmentViewModel
            {
                AssignmentGroupID = 1,
                Name = "Another Assignment"
            };

            // Act:
            AssignmentDTO newAssignment = _service.AddAssignment(1, assignmentModel);

            // Assert:
            Assert.AreEqual(assignmentModel.Name, newAssignment.Name);
            Assert.AreEqual(assignmentModel.AssignmentGroupID, newAssignment.AssignmentGroupID);
        }
コード例 #2
0
 public AssignmentDTO AddAssignment(int courseInstanceID, int assignmentGroupID, AddAssignmentViewModel assignmentData)
 {
     return(_assignmentService.AddAssignment(courseInstanceID, assignmentData));
 }