public void RequestInterceptor()
        {
            AbstractOAuth1ApiBindingTests apiBinding = new AbstractOAuth1ApiBindingTests("consumer_key", "consumer_secret", "access_token", "token_secret");

            MockRestServiceServer mockServer = MockRestServiceServer.CreateServer(apiBinding.RestTemplate);
            mockServer.ExpectNewRequest()
                .AndExpectUri("https://api.someprovider.com/status/update")
                .AndExpectMethod(HttpMethod.POST)
                .AndExpectHeader("Content-Type", MediaType.APPLICATION_FORM_URLENCODED.ToString())
                .AndExpect(MatchHeaderStartsWith("Authorization", "OAuth "))
                .AndExpectHeaderContains("Authorization", "oauth_version=\"1.0\"")
                .AndExpectHeaderContains("Authorization", "oauth_nonce=\"")
                .AndExpectHeaderContains("Authorization", "oauth_signature_method=\"HMAC-SHA1\"")
                .AndExpectHeaderContains("Authorization", "oauth_consumer_key=\"consumer_key\"")
                .AndExpectHeaderContains("Authorization", "oauth_token=\"access_token\"")
                .AndExpectHeaderContains("Authorization", "oauth_timestamp=\"")
                .AndExpectHeaderContains("Authorization", "oauth_signature=\"")
                .AndExpectBody("status=Hello+there%21");

            apiBinding.UpdateStatus();
        }
 public void IsAuthorizedForUser_NotAuthorized()
 {
     AbstractOAuth1ApiBindingTests apiBinding = new AbstractOAuth1ApiBindingTests();
     Assert.IsFalse(apiBinding.IsAuthorized);
 }
 public void IsAuthorizedForUser()
 {
     AbstractOAuth1ApiBindingTests apiBinding = new AbstractOAuth1ApiBindingTests("API_KEY", "API_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET");
     Assert.IsTrue(apiBinding.IsAuthorized);
 }