Exemplo n.º 1
0
        public FilesResponse List(FilesListRequest request)
        {
            var requestParams = this.request.BuildRequestParams(request);
            var response = this.request.ExecuteAndDeserializeRequest<FilesResponse>("/files.list", requestParams);

            return response;
        }
Exemplo n.º 2
0
        public void FileListShouldCallCorrectEndpoint()
        {
            var requestHandlerMock = ExecRequestMock<FilesResponse>("/files.list");

            var request = new FilesListRequest { Types = "all" };

            requestHandlerMock.Setup(r => r.BuildRequestParams(request))
                              .Returns<Dictionary<string, string>>(null)
                              .Verifiable();

            var subject = new FilesApi(requestHandlerMock.Object);
            var result = subject.List(request);

            requestHandlerMock.Verify();
            Assert.NotNull(result);
        }