Пример #1
0
        public async void Request_ForInvalidParameters_ReturnsError()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Client, _clientToken);

            var response = await uberClient.RequestAsync(
                "INVALID",
                Constants.MelbourneLatitude, Constants.MelbourneLongitude,
                Constants.SouthPoleLatitude, Constants.SouthPoleLongitude);

            response.ShouldNotBe(null);
            response.Data.ShouldBe(null);
            response.Error.ShouldNotBe(null);
        }
Пример #2
0
        public async void Request_ForValidParameters_ReturnsRequest()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Client, _clientToken);

            var response = await uberClient.RequestAsync(
                "893b94af-ca9d-4f0f-9201-6d426cedaa5c",
                Constants.MelbourneLatitude, Constants.MelbourneLongitude,
                Constants.SorrentoLatitude, Constants.SorrentoLongitude);

            response.ShouldNotBe(null);
            response.Data.ShouldNotBe(null);
            response.Data.ShouldBeOfType <Request>();
        }