AjaxControlToolkit.Tests.HtmlSanititzer.DefaultHtmlsanitizerSanitizerTests.HtmlEncode C# (CSharp) Method

HtmlEncode() private method

private HtmlEncode ( ) : void
return void
        public void HtmlEncode()
        {
            DefaultHtmlSanitizer target = new DefaultHtmlSanitizer();
            Dictionary<string, string[]> elementWhiteList = CreateElementWhiteList();

            // Act
            string htmlFragment = "<div style=\"background-color: test\">";
            string actual = target.GetSafeHtmlFragment(htmlFragment, elementWhiteList);

            // Assert
            string expected = "<div style=\"background-color: test\"></div>";
            StringAssert.AreEqualIgnoringCase(expected, actual);
        }
DefaultHtmlsanitizerSanitizerTests