public void BuildTokenListTest() { var rtfParagraph = new RtfParagraph(true, true, ReadingDirection.LeftToRight); rtfParagraph.setText("Test Token Method"); rtfParagraph.addCharFormat(-1, -1); Assert.DoesNotThrow(() => rtfParagraph.render()); }
public void BuildTokenListTestForTotalParagraph() { var text = "Test Token Method"; var rtfParagraph = new RtfParagraph(true, true, ReadingDirection.LeftToRight); rtfParagraph.setText(text); rtfParagraph.addCharFormat(0, text.Length - 1); Assert.DoesNotThrow(() => rtfParagraph.render()); }
public void LTR_ParagraphRender() { var textPara = "Test Paragraph"; var sb = new StringBuilder(); sb.AppendLine(string.Format(@"{{\pard\fi0\{0}par\ql", LtrContent)) .AppendLine(textPara) .AppendLine(@"\par}"); var expectString = sb.ToString(); var rtfParagraph = new RtfParagraph(true, true); rtfParagraph.setText(textPara); var result = rtfParagraph.render(); Assert.AreEqual(expectString, result); }