public async Task AuthenticateByRefreshTokenWithInvalidClientId()
        {
            var sut = new HiDriveAuthenticator("invalid_id", ClientConfiguration.ClientSecret);

            try
            {
                var result = await sut.AuthenticateByRefreshTokenAsync(ClientConfiguration.RefreshToken);

                Assert.Fail("AuthenticationException expected");
            }
            catch (AuthenticationException ex)
            {
                var error = ex.Error;

                Assert.IsNotNull(error);
                Assert.AreEqual("invalid_request", error.Error);
                Assert.AreEqual("invalid client_id (param auth)", error.Description);
            }
        }
Exemplo n.º 2
0
 static BaseRequestTest()
 {
     Authenticator = new HiDriveAuthenticator(ClientConfiguration.ClientId, ClientConfiguration.ClientSecret);
     Authenticator.AuthenticateByRefreshTokenAsync(ClientConfiguration.RefreshToken).Wait();
 }