public async Task GetTaskQuery_Execute_Success() { var todoTask = _fixture.Create <TodoItem>(); _taskRepositoryMock.GetTask(Arg.Any <long>()).Returns(todoTask); var result = await _getTaskQuery.Execute(todoTask.Id); result.IsSuccess().Should().BeTrue(); result.Data.Id.Should().Be(todoTask.Id); }
public async Task <IActionResult> GetTodo([FromRoute] long id) { var result = await _getTaskQuery.Execute(id); return(OkOrFailure(result)); }