Ejemplo n.º 1
0
        public void ResolveTranslateLinkUsingCreate()
        {
            var link = new TranslationLink()
            {
                FromLanguage = "English",
                ToLanguage   = "French",
                FromPhrase   = "Hello"
            };

            var request = link.CreateRequest();

            Assert.Equal("http://api.microsofttranslator.com/V2/Http.svc/Translate?text=Hello&to=French&from=English", request.RequestUri.AbsoluteUri);
        }
Ejemplo n.º 2
0
        public void ResolveTranslateLinkUsingCreate()
        {
            var link = new TranslationLink()
            {
                FromLanguage = "English",
                ToLanguage = "French",
                FromPhrase = "Hello"
            };

            var request = link.CreateRequest();

            Assert.Equal("http://api.microsofttranslator.com/V2/Http.svc/Translate?text=Hello&to=French&from=English", request.RequestUri.AbsoluteUri);
        }