Exemple #1
0
        public void AddAssignmentGroup()
        {
            // Arrange:
            AddAssignmentGroupViewModel groupModel = new AddAssignmentGroupViewModel
            {
                GradedAssignments = 5,
                Name   = "Another generic group",
                Weight = 10
            };

            int courseInstanceID = 1;

            // Act:
            AssignmentGroupDTO newGroup = _service.AddAssignmentGroup(courseInstanceID, groupModel);

            // Assert:
            Assert.AreEqual(groupModel.Name, newGroup.Name);
            Assert.AreEqual(groupModel.GradedAssignments, newGroup.GradedAssignments);
            Assert.AreEqual(groupModel.Weight, newGroup.Weight);
        }
 public AssignmentGroupDTO AddAssigmentGroup(int courseInstanceID, AddAssignmentGroupViewModel model)
 {
     APIValidation.Validate(model);
     return(_assignmentService.AddAssignmentGroup(courseInstanceID, model));
 }