Пример #1
0
        public async void GetProducts_ForInvalidParameters_ReturnsEmptyList()
        {
            var uberClient = new ClientAuthenticatedUberRiderService(_clientToken, _sandboxUrl);

            var response = await uberClient.GetProductsAsync(
                TestLocations.SouthPoleLatitude, TestLocations.SouthPoleLongitude);

            Assert.NotNull(response);
            Assert.NotNull(response.Data);
            Assert.IsType <ProductCollection>(response.Data);
            Assert.NotNull(response.Data.Products);
            Assert.Empty(response.Data.Products);
        }
Пример #2
0
        public async void GetProducts_ForValidParameters_ReturnsListOfProducts()
        {
            var uberClient = new ClientAuthenticatedUberRiderService(_clientToken, _sandboxUrl);

            var response = await uberClient.GetProductsAsync(
                TestLocations.WhiteHouseLatitude, TestLocations.WhiteHouseLongitude);

            Assert.NotNull(response);
            Assert.NotNull(response.Data);
            Assert.IsType <ProductCollection>(response.Data);
            Assert.NotNull(response.Data.Products);
            Assert.NotEmpty(response.Data.Products);
            Assert.NotNull(response.Data.Products[0].DisplayName);
            Assert.NotEmpty(response.Data.Products[0].DisplayName);
        }