Esempio n. 1
0
 public void TextDoesNotGetMalformedWhenPruned()
 {
     _richText.MaxLength = 100;
     for (var i = 0; i < 10; i++)
     {
         _richText.Append("*This long string should have a high chance of getting cut off somewhere in the middle*");
     }
     Assert.IsTrue(RichText.HtmlIsValid(_richText.ToString()));
 }
Esempio n. 2
0
 public void InvalidHtml()
 {
     Assert.IsFalse(RichText.HtmlIsValid("<b>This is <i>a test</b>"));
 }
Esempio n. 3
0
 public void ValidHtml()
 {
     Assert.IsTrue(RichText.HtmlIsValid("<b>This is <i>a</i> test</b>"));
     Assert.IsTrue(RichText.HtmlIsValid("<b>This is \n<i>a\n</i> test</b>"));
 }