コード例 #1
0
        public async Task GetNonArchivedTasks_Should_Return_Only_NonArchived_Tasks()
        {
            var expectedCount = 3;

            var result = await _tasksService.GetNonArchivedTasks();

            var actualCount           = result.Count();
            var containsArchivedTasks = result.Any(x => x.IsArchived);

            Assert.Equal(expectedCount, actualCount);
            Assert.False(containsArchivedTasks);
        }
コード例 #2
0
        public async Task <IActionResult> Index()
        {
            ViewData["Goals"] = await _tasksService.GetActualGoals();

            return(View(await _tasksService.GetNonArchivedTasks()));
        }