public void RequestInterceptor() { AbstractOAuth2ApiBindingTests apiBinding = new AbstractOAuth2ApiBindingTests("access_token"); AssertThatRequestInterceptorWritesAuthorizationHeader(apiBinding, "Bearer access_token"); apiBinding.UpdateStatus(); }
public void RequestInterceptor_Draft10() { AbstractOAuth2ApiBindingTests.OAuth2Version = OAuth2Version.Draft10; AbstractOAuth2ApiBindingTests apiBinding = new AbstractOAuth2ApiBindingTests("access_token"); AssertThatRequestInterceptorWritesAuthorizationHeader(apiBinding, "OAuth access_token"); apiBinding.UpdateStatus(); }
public void IsAuthorizedForUser_NotAuthorized() { AbstractOAuth2ApiBindingTests apiBinding = new AbstractOAuth2ApiBindingTests(); Assert.IsFalse(apiBinding.IsAuthorized); }
public void IsAuthorizedForUser() { AbstractOAuth2ApiBindingTests apiBinding = new AbstractOAuth2ApiBindingTests("ACCESS_TOKEN"); Assert.IsTrue(apiBinding.IsAuthorized); }