public async Task DeleteDoneTasks_Should_Remove_All_Tasks_With_IsDone_True() { var expectedCount = 2; _tasksService.DeleteDoneTasks(); var allTasks = await _repository.GetAllTasks(); var actualCount = allTasks.Count(); var containsDoneTasks = allTasks.Any(x => x.IsDone); Assert.Equal(expectedCount, actualCount); Assert.False(containsDoneTasks); }
public IActionResult DeleteDoneTasks() { _tasksService.DeleteDoneTasks(); return(RedirectToAction(nameof(Index))); }