예제 #1
0
        public async System.Threading.Tasks.Task Should_Get_All_Tasks()
        {
            //Act
            var output = await _taskAppService.GetAllAsync(new GetAllTasksInput());

            //Assert
            output.Items.Count.ShouldBe(2);
            output.Items.Count(t => t.AssignedPersonName != null).ShouldBe(1);
        }
예제 #2
0
        public async Task <IActionResult> Index(GetAllTasksInput input)
        {
            var output = await _taskAppService.GetAllAsync(input);

            var model = new IndexViewModel(output.Items)
            {
                SelectedTaskState = input.State
            };

            return(View(model));
        }
예제 #3
0
 public async Task <IActionResult> Get()
 {
     return(Ok(await _appService.GetAllAsync()));
 }