public void DeleteAssignmentItem() { var assignmentItem = new AssignmentItem(); var saveTask = service.SaveAssignmentItemAsync(assignmentItem, CancellationToken.None); saveTask.Wait(); var deleteTask = service.DeleteAssignmentItemAsync(assignmentItem, CancellationToken.None); deleteTask.Wait(); Assert.That(deleteTask.Result, Is.EqualTo(1)); }
/// <summary> /// Deletes an assignment item /// </summary> public Task DeleteAssignmentItemAsync(Assignment assignment, AssignmentItem item) { return(service .DeleteAssignmentItemAsync(item) .ContinueWith(t => assignment.TotalItems--)); }