Example #1
0
        public void HtmlText_HasNoCData_ResultContainsNoHyperlink()
        {
            var element = XElement.Parse(
            @"<message guid='abc' author='merger' status='open' date='2009-07-18T23:53:04Z'>
             hello
            </message>");

            var m = new Message(element);
            Assert.IsFalse(m.GetHtmlText(new EmbeddedMessageContentHandlerRepository()).Contains("<a"));
        }
Example #2
0
        public void HtmlText_HadCData_ResultContainsHyperlink()
        {
            var element = XElement.Parse(
            @"<message guid='abc' author='merger' status='open' date='2009-07-18T23:53:04Z'>
              <![CDATA[some something]]>
            </message>");

            var m = new Message(element);
            string text = m.GetHtmlText(new EmbeddedMessageContentHandlerRepository());
            Assert.IsTrue(text.Contains("<a"));
        }