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); }
public AssignmentDTO AddAssignment(int courseInstanceID, int assignmentGroupID, AddAssignmentViewModel assignmentData) { return(_assignmentService.AddAssignment(courseInstanceID, assignmentData)); }