public static async Task ExecuteAsync(
     [HttpTrigger("post", Route = "todo/{todoListId}/task/{todoListTaskId}")] HttpRequest httpRequest,
     [Request] CompleteTodoListTaskRequestDto requestDto,
     [Document] TodoListDocument todoListDocument,
     [Authorization] UserDocument userDocument,
     [Service] ITodoService service,
     CancellationToken cancellationToken)
 => await service.CompleteTodoListTaskAsync(requestDto, todoListDocument, userDocument, cancellationToken);
Beispiel #2
0
        public async Task CompleteTodoListTaskAsync()
        {
            var requestDto = new CompleteTodoListTaskRequestDto
            {
                TodoListId     = Guid.NewGuid(),
                TodoListTaskId = Guid.NewGuid(),
            };
            var todoListDocument = new TodoListDocument
            {
                Id    = requestDto.TodoListId,
                Tasks = new[]
                {
                    new TodoListTaskDocument
                    {
                        TaskId = requestDto.TodoListTaskId,
                    },
                },
            };
            var userDocument = new UserDocument();

            await _todoService.CompleteTodoListTaskAsync(requestDto, todoListDocument, userDocument, CancellationToken.None);

            _documentClientMock.Verify();
        }