Exemplo n.º 1
0
        public void CreateSignature(string expectedSignatureBase, string expectedSignature, string uri, string httpMethod, string consumerSecret, string tokenSecret, params string[] parameters)
        {
            string newUri;
            string signatureBase = OAuthUtility.CreateSignatureBase(new Uri(uri), httpMethod, ToPairs(parameters).ToList(), out newUri);

            Assert.AreEqual(expectedSignatureBase, signatureBase);

            Assert.AreEqual(expectedSignature, OAuthUtility.CreateHmacSha1Signature(signatureBase, consumerSecret, tokenSecret));
        }