Example #1
0
        public void SignUrlAsString_escapes_those_stupid_plus_signs_and_other_evils_in_signature()
        {
            var url = "http://www.example.com?parameter=hello&again=there";

            for (int i = 0; i < 50; i++)
            {
                var signedUrl = new UrlSigner().SignGetUrl(url, null, null, GetOAuthCredentials());
                var index     = signedUrl.IndexOf("oauth_signature");
                var signature = signedUrl.Substring(index + "oauth_signature".Length);

                Assert.That(!signature.Contains("+"), "signature contains a '+' character and isn't being encoded properly");
            }
        }