GetSignedUri() публичный Метод

public GetSignedUri ( Uri uri ) : string
uri System.Uri
Результат string
Пример #1
0
        public void Api_Key_Signing()
        {
            var sign = new GoogleSigned("mykey");

            string signed = sign.GetSignedUri("http://a/dummy/server?a=b");

            Assert.AreEqual("http://a/dummy/server?a=b&key=mykey", signed);
        }
        public void ctor_ApiKey_And_Signature()
        {
            //arrange
            string expected = BASE_URI + "&key=" + APIKEY + "&signature=ZSPqURu7BsGJ_XybwhRY4kk3Zhg=";

            //act
            GoogleSigned sign   = new GoogleSigned(APIKEY, SHARED_SECRET);
            string       actual = sign.GetSignedUri(BASE_URI);

            //assert
            Assert.AreEqual(expected, actual);
        }
        public void ctor_ApiKey()
        {
            //arrange
            string expected = BASE_URI + "&key=" + APIKEY;

            //act
            GoogleSigned sign   = new GoogleSigned(APIKEY);
            string       actual = sign.GetSignedUri(BASE_URI);

            //assert
            Assert.AreEqual(expected, actual);
        }
        public void ctor_ClientId_ForBusiness_Signed()
        {
            //arrange
            var expected = BASE_URI + "&client=" + CLIENT_ID + "&signature=uq9UYD8EJ2JIXvdNGkiMr5FsVdI=";

            //act
            var GoogleSigned = new GoogleSigned(CLIENT_ID, SHARED_SECRET, GoogleSignedType.Business);
            var actual       = GoogleSigned.GetSignedUri(BASE_URI);

            //assert
            Assert.AreEqual(expected, actual);
        }