Exemple #1
0
        public void BuildTokenListTest()
        {
            var rtfParagraph = new RtfParagraph(true, true, ReadingDirection.LeftToRight);

            rtfParagraph.setText("Test Token Method");
            rtfParagraph.addCharFormat(-1, -1);
            Assert.DoesNotThrow(() => rtfParagraph.render());
        }
Exemple #2
0
        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());
        }
Exemple #3
0
        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);
        }