예제 #1
0
        public async void GetPriceEstimate_ForInvalidParameters_ReturnsEmptyList()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Server, _serverToken);

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

            response.ShouldNotBe(null);
            response.Data.ShouldNotBe(null);
            response.Data.ShouldBeOfType <PriceEstimateCollection>();
            response.Data.PriceEstimates.ShouldNotBe(null);
            response.Data.PriceEstimates.Count.ShouldBe(0);
        }
예제 #2
0
        public async void GetPriceEstimate_ForValidParameters_ReturnsListOfPriceEstimates()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Server, _serverToken);

            var response = await uberClient.GetPriceEstimateAsync(
                Constants.MelbourneLatitude, Constants.MelbourneLongitude,
                Constants.SorrentoLatitude, Constants.SorrentoLongitude);

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