예제 #1
0
        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);
        }
예제 #2
0
 public IActionResult DeleteDoneTasks()
 {
     _tasksService.DeleteDoneTasks();
     return(RedirectToAction(nameof(Index)));
 }