Exemplo n.º 1
0
        public async void GetProducts_ForInvalidParameters_ReturnsEmptyList()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Server, _serverToken);

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

            response.ShouldNotBe(null);
            response.Data.ShouldNotBe(null);
            response.Data.ShouldBeOfType <ProductCollection>();
            response.Data.Products.ShouldNotBe(null);
            response.Data.Products.Count.ShouldBe(0);
        }
Exemplo n.º 2
0
        public async void GetProducts_ForValidParameters_ReturnsListOfProducts()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Server, _serverToken);

            var response = await uberClient.GetProductsAsync(
                Constants.MelbourneLatitude, Constants.MelbourneLongitude);

            response.ShouldNotBe(null);
            response.Data.ShouldNotBe(null);
            response.Data.ShouldBeOfType <ProductCollection>();
            response.Data.Products.ShouldNotBe(null);
            response.Data.Products.Count.ShouldBeGreaterThan(0);
            response.Data.Products[0].DisplayName.ShouldNotBeNullOrEmpty();
        }