예제 #1
0
        public async void GetPromotion_ForInvalidParameters_ReturnsError()
        {
            var uberClient = new ClientAuthenticatedUberRiderService(_clientToken, _sandboxUrl);

            var response = await uberClient.GetPromotionAsync(
                TestLocations.WhiteHouseLatitude, TestLocations.WhiteHouseLongitude,
                TestLocations.SouthPoleLatitude, TestLocations.SouthPoleLongitude);

            Assert.NotNull(response);
            Assert.Null(response.Data);
            Assert.NotNull(response.Error);
        }
예제 #2
0
        public async void GetPromotion_ForValidParameters_ReturnsPromotion()
        {
            var uberClient = new ClientAuthenticatedUberRiderService(_clientToken, _sandboxUrl);

            var response = await uberClient.GetPromotionAsync(
                TestLocations.WhiteHouseLatitude, TestLocations.WhiteHouseLongitude,
                TestLocations.CapitalLatitude, TestLocations.CapitalLongitude);

            Assert.NotNull(response);
            Assert.NotNull(response.Data);
            Assert.IsType <Promotion>(response.Data);
        }