Пример #1
0
        public async Task Delete_Note_Success()
        {
            var taskId = _context.Tasks.First().TaskId;

            //act
            await _service.DeleteAsync(taskId);

            var resultTask = await _context.Tasks.SingleOrDefaultAsync(x => x.TaskId == taskId);

            //assert
            Assert.IsNull(resultTask);
        }
Пример #2
0
 public async Task DeleteTask(Guid idTask)
 {
     await _userTaskService.DeleteAsync(idTask);
 }
Пример #3
0
        public async Task <IActionResult> DeleteTask(int taskId, int groupId)
        {
            await _userTaskService.DeleteAsync(taskId);

            return(RedirectToAction("Edit", "TaskGroup", new { groupId = groupId }));
        }