Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        public async Task BrowseCustomers_ValidRequest_ReturnsResponse()
        {
            var browseRequest = new BrowseCustomersRequest {
            };

            var browseResponse = await Fixture.Customers.BrowseCustomersAsync(browseRequest);
        }
Exemplo n.º 3
0
 public Task <IObjectClientResponse <BrowseCustomersResponse> > BrowseCustomersAsync(BrowseCustomersRequest request)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public Task <BrowseCustomersResponse> BrowseCustomersAsync(BrowseCustomersRequest request)
 {
     return(ExecuteAsync(e => e.BrowseCustomersAsync(request)));
 }
Exemplo n.º 5
0
 public Task <BrowseCustomersResponse> BrowseCustomersAsync(BrowseCustomersRequest request)
 {
     return(HandleAsync <BrowseCustomersRequest, BrowseCustomersResponse>(request));
 }