Esempio n. 1
0
        public void AlternateLanguage()
        {
            var name   = "fr-CA";
            var href   = "/fr-CA/Home";
            var page   = new PageInfo().Set(PageInfo.AlternateLanguage(name, href, "text/html"));
            var result = page.ToString(PageInfoObjectSection.Basic | PageInfoObjectSection.OpenGraph, false);

            SrkToolkit.Testing.Assert.AreEqual("<link href=\"" + href + "\" hrefLang=\"" + name + "\" rel=\"alternate\" type=\"text/html\" /><meta property=\"og:locale:alternate\" content=\"" + name.Replace("-", "_").ProperHtmlAttributeEscape() + "\" />", result);
        }