示例#1
0
        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();
 }
示例#3
0
        public void RequestInterceptor_Draft10()
        {
            AbstractOAuth2ApiBindingTests.OAuth2Version = OAuth2Version.Draft10;
            AbstractOAuth2ApiBindingTests apiBinding = new AbstractOAuth2ApiBindingTests("access_token");

            AssertThatRequestInterceptorWritesAuthorizationHeader(apiBinding, "OAuth access_token");
            apiBinding.UpdateStatus();
        }
	    public void RequestInterceptor() 
        {
            AbstractOAuth2ApiBindingTests apiBinding = new AbstractOAuth2ApiBindingTests("access_token");
            AssertThatRequestInterceptorWritesAuthorizationHeader(apiBinding, "Bearer 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);
 }
示例#7
0
        public void IsAuthorizedForUser_NotAuthorized()
        {
            AbstractOAuth2ApiBindingTests apiBinding = new AbstractOAuth2ApiBindingTests();

            Assert.IsFalse(apiBinding.IsAuthorized);
        }
示例#8
0
        public void IsAuthorizedForUser()
        {
            AbstractOAuth2ApiBindingTests apiBinding = new AbstractOAuth2ApiBindingTests("ACCESS_TOKEN");

            Assert.IsTrue(apiBinding.IsAuthorized);
        }