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())); }
public void InvalidHtml() { Assert.IsFalse(RichText.HtmlIsValid("<b>This is <i>a test</b>")); }
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>")); }