Esempio n. 1
0
        public void TestFormatting(WriteStyle style, string value, string expected)
        {
            TestHtmlLogger logger = new TestHtmlLogger();

            logger.TestAppendFormatedString(style, value);
            logger.HtmlTextBuffer.Should().EndWith(expected);
        }
Esempio n. 2
0
        public void CheckTableOutputStability()
        {
            // Just checking to make sure outputing a table doesn't crash
            Table testTable = Table.Create(
                new ColumnFormat(1, ContentVisibility.Default, Justification.Left),
                new ColumnFormat(1, ContentVisibility.Default, Justification.Right),
                new ColumnFormat(1, ContentVisibility.Default, Justification.Centered));

            testTable.AddRow("one", "two", "three");
            TestHtmlLogger logger = new TestHtmlLogger();
            logger.Write(testTable);
        }
Esempio n. 3
0
        public void CheckTableOutputStability()
        {
            // Just checking to make sure outputing a table doesn't crash
            Table testTable = Table.Create(
                new ColumnFormat(1, ContentVisibility.Default, Justification.Left),
                new ColumnFormat(1, ContentVisibility.Default, Justification.Right),
                new ColumnFormat(1, ContentVisibility.Default, Justification.Centered));

            testTable.AddRow("one", "two", "three");
            TestHtmlLogger logger = new TestHtmlLogger();

            logger.Write(testTable);
        }
Esempio n. 4
0
 public void TestClipboardFormat()
 {
     const string expected =
         "Format:HTML Format\r\n" +
         "Version:1.0\r\n" +
         "StartHTML:0000000125\r\n" +
         "EndHTML:0000000454\r\n" +
         "StartFragment:0000000261\r\n" +
         "EndFragment:0000000422\r\n" +
         "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"><HTML><HEAD><TITLE>From Clipboard</TITLE></HEAD><BODY><!--StartFragment-->" +
         "<div style='font-size:11.0pt;font-family:Calibri,sans-serif><span style='font-size:11.0pt;font-family:Calibri,sans-serif;white-space:pre'>TestString</span></div><!--EndFragment--></BODY></HTML>";
     TestHtmlLogger logger = new TestHtmlLogger();
     logger.Write("TestString");
     logger.ToClipboardString().Should().Be(expected);
 }
Esempio n. 5
0
        public void TestClipboardFormat()
        {
            const string expected =
                "Format:HTML Format\r\n" +
                "Version:1.0\r\n" +
                "StartHTML:0000000125\r\n" +
                "EndHTML:0000000454\r\n" +
                "StartFragment:0000000261\r\n" +
                "EndFragment:0000000422\r\n" +
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"><HTML><HEAD><TITLE>From Clipboard</TITLE></HEAD><BODY><!--StartFragment-->" +
                "<div style='font-size:11.0pt;font-family:Calibri,sans-serif><span style='font-size:11.0pt;font-family:Calibri,sans-serif;white-space:pre'>TestString</span></div><!--EndFragment--></BODY></HTML>";
            TestHtmlLogger logger = new TestHtmlLogger();

            logger.Write("TestString");
            logger.ToClipboardString().Should().Be(expected);
        }
Esempio n. 6
0
 public void TestFormatting(WriteStyle style, string value, string expected)
 {
     TestHtmlLogger logger = new TestHtmlLogger();
     logger.TestAppendFormatedString(style, value);
     logger.HtmlTextBuffer.Should().EndWith(expected);
 }