예제 #1
0
        public async void GetUserActivity_ForInvalidParameters_ReturnsError()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Client, _clientToken);

            var response = await uberClient.GetUserActivityAsync(0, -1);

            response.ShouldNotBe(null);
            response.Data.ShouldBe(null);
            response.Error.ShouldNotBe(null);
        }
예제 #2
0
        public async void GetUserActivity_ForValidParameters_ReturnsUserUserActivity()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Client, _clientToken);

            var response = await uberClient.GetUserActivityAsync(0, 10);

            response.ShouldNotBe(null);
            response.Data.ShouldNotBe(null);
            response.Data.ShouldBeOfType <Promotion>();
        }
예제 #3
0
        public async void GetRequestDetails_ForValidParameters_ReturnsRequestDetails()
        {
            var uberClient = new UberSandboxClient(AccessTokenType.Client, _clientToken);

            var allRequests = await uberClient.GetUserActivityAsync(0, 50);

            var response = await uberClient.GetRequestDetailsAsync(allRequests.Data.History.First().Id);

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