コード例 #1
0
        public async void RefreshAccessToken_ForInvalidefreshToken_ReturnsNull()
        {
            var uberClient = new UberAuthenticationClient(_clientId, _clientSecret);

            var response = await uberClient.RefreshAccessTokenAsync("INVALID", "https://sandbox-api.uber.com/");

            Assert.Null(response);
        }
コード例 #2
0
        public async void RefreshAccessToken_ForValidRefreshToken_ReturnsValidAccessToken()
        {
            var uberClient = new UberAuthenticationClient(_clientId, _clientSecret);

            var response = await uberClient.RefreshAccessTokenAsync("TODO", "https://sandbox-api.uber.com/");

            Assert.NotNull(response);
            Assert.IsType <AccessToken>(response);
            Assert.NotEmpty(response.Value);
        }
コード例 #3
0
        public async void RefreshAccessToken_ForValidRefreshToken_ReturnsValidAccessToken()
        {
            var uberClient = new UberAuthenticationClient(_clientId, _clientSecret);

            var response = await uberClient.RefreshAccessTokenAsync("TODO", "https://sandbox-api.uber.com/");

            response.ShouldNotBe(null);
            response.ShouldBeOfType <AccessToken>();
            response.Value.ShouldNotBeNullOrEmpty();
        }