コード例 #1
0
        public async Task BrowseCustomers_ValidRequest_ReturnsResponse()
        {
            var browseRequest = new BrowseCustomersRequest
            {
                Page = 2,
                Size = 3,
            };

            var expectedRecords = new List <CustomerRecord>
            {
                _customerRecords[3],
                _customerRecords[4],
                _customerRecords[5],
            };

            var browseResponse = await Fixture.Customers.BrowseCustomersAsync(browseRequest);

            Assert.Equal(_customerRecords.Count, browseResponse.TotalRecords);
            Assert.Equal(expectedRecords.Count, browseResponse.Records.Count);

            for (int i = 0; i < expectedRecords.Count; i++)
            {
                var expectedRecord = expectedRecords[i];
                var responseRecord = browseResponse.Records[i];

                Assert.Equal(expectedRecord.Id, responseRecord.Id);
                Assert.Equal(expectedRecord.FirstName, responseRecord.FirstName);
                Assert.Equal(expectedRecord.LastName, responseRecord.LastName);
            }
        }
コード例 #2
0
        public async Task BrowseCustomers_ValidRequest_ReturnsResponse()
        {
            var browseRequest = new BrowseCustomersRequest {
            };

            var browseResponse = await Fixture.Customers.BrowseCustomersAsync(browseRequest);
        }
コード例 #3
0
ファイル: CustomerHttpService.cs プロジェクト: optivem/demo
 public Task <IObjectClientResponse <BrowseCustomersResponse> > BrowseCustomersAsync(BrowseCustomersRequest request)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public Task <BrowseCustomersResponse> BrowseCustomersAsync(BrowseCustomersRequest request)
 {
     return(ExecuteAsync(e => e.BrowseCustomersAsync(request)));
 }
コード例 #5
0
 public Task <BrowseCustomersResponse> BrowseCustomersAsync(BrowseCustomersRequest request)
 {
     return(HandleAsync <BrowseCustomersRequest, BrowseCustomersResponse>(request));
 }