|
| 1 | +using System; |
| 2 | +using iText.Html2pdf; |
| 3 | + |
| 4 | +namespace iText.Html2pdf.Css { |
| 5 | + [NUnit.Framework.Category("IntegrationTest")] |
| 6 | + public class VerticalAlignmentInlineBlockTest : ExtendedHtmlConversionITextTest { |
| 7 | + public static readonly String sourceFolder = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext |
| 8 | + .CurrentContext.TestDirectory) + "/resources/itext/html2pdf/css/VerticalAlignmentInlineBlockTest/"; |
| 9 | + |
| 10 | + public static readonly String destinationFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory |
| 11 | + + "/test/itext/html2pdf/css/VerticalAlignmentInlineBlockTest/"; |
| 12 | + |
| 13 | + [NUnit.Framework.OneTimeSetUp] |
| 14 | + public static void BeforeClass() { |
| 15 | + CreateOrClearDestinationFolder(destinationFolder); |
| 16 | + } |
| 17 | + |
| 18 | + [NUnit.Framework.Test] |
| 19 | + public virtual void CheckBaselineAlignmentTest() { |
| 20 | + ConvertToPdfAndCompare("baseline", sourceFolder, destinationFolder); |
| 21 | + } |
| 22 | + |
| 23 | + [NUnit.Framework.Test] |
| 24 | + public virtual void CheckBaselineAlignmentWitWrapTest() { |
| 25 | + ConvertToPdfAndCompare("baseline-wrap", sourceFolder, destinationFolder); |
| 26 | + } |
| 27 | + |
| 28 | + [NUnit.Framework.Test] |
| 29 | + public virtual void CheckBottomAlignmentTest() { |
| 30 | + ConvertToPdfAndCompare("bottom", sourceFolder, destinationFolder); |
| 31 | + } |
| 32 | + |
| 33 | + [NUnit.Framework.Test] |
| 34 | + public virtual void CheckBottomAlignmentWitWrapTest() { |
| 35 | + ConvertToPdfAndCompare("bottom-wrap", sourceFolder, destinationFolder); |
| 36 | + } |
| 37 | + |
| 38 | + [NUnit.Framework.Test] |
| 39 | + public virtual void CheckMiddleAlignmentTest() { |
| 40 | + ConvertToPdfAndCompare("middle", sourceFolder, destinationFolder); |
| 41 | + } |
| 42 | + |
| 43 | + [NUnit.Framework.Test] |
| 44 | + public virtual void CheckMiddleAlignmentWitWrapTest() { |
| 45 | + ConvertToPdfAndCompare("middle-wrap", sourceFolder, destinationFolder); |
| 46 | + } |
| 47 | + |
| 48 | + [NUnit.Framework.Test] |
| 49 | + public virtual void CheckTopAlignmentTest() { |
| 50 | + ConvertToPdfAndCompare("top", sourceFolder, destinationFolder); |
| 51 | + } |
| 52 | + |
| 53 | + [NUnit.Framework.Test] |
| 54 | + public virtual void CheckTopAlignmentWitWrapTest() { |
| 55 | + ConvertToPdfAndCompare("top-wrap", sourceFolder, destinationFolder); |
| 56 | + } |
| 57 | + |
| 58 | + [NUnit.Framework.Test] |
| 59 | + public virtual void CheckMixedAlignmentTest() { |
| 60 | + ConvertToPdfAndCompare("mixed", sourceFolder, destinationFolder); |
| 61 | + } |
| 62 | + |
| 63 | + [NUnit.Framework.Test] |
| 64 | + public virtual void CheckMixedAlignment2Test() { |
| 65 | + // TODO DEVSIX-3757 Update reference doc if the result matched the expected result |
| 66 | + ConvertToPdfAndCompare("mixed2", sourceFolder, destinationFolder); |
| 67 | + } |
| 68 | + |
| 69 | + [NUnit.Framework.Test] |
| 70 | + public virtual void CheckMixedAlignment3Test() { |
| 71 | + // TODO DEVSIX-3757 Update reference doc if the result matched the expected result |
| 72 | + ConvertToPdfAndCompare("mixed3", sourceFolder, destinationFolder); |
| 73 | + } |
| 74 | + |
| 75 | + [NUnit.Framework.Test] |
| 76 | + public virtual void CheckCustomerExampleTest() { |
| 77 | + ConvertToPdfAndCompare("customerExample", sourceFolder, destinationFolder); |
| 78 | + } |
| 79 | + |
| 80 | + [NUnit.Framework.Test] |
| 81 | + public virtual void CheckSingleImageTest() { |
| 82 | + ConvertToPdfAndCompare("singleimage", sourceFolder, destinationFolder); |
| 83 | + } |
| 84 | + |
| 85 | + [NUnit.Framework.Test] |
| 86 | + public virtual void CheckElementsInDivAlignmentTest() { |
| 87 | + ConvertToPdfAndCompare("ElementsInDiv", sourceFolder, destinationFolder); |
| 88 | + } |
| 89 | + |
| 90 | + [NUnit.Framework.Test] |
| 91 | + public virtual void CheckSpanAlignmentTest() { |
| 92 | + ConvertToPdfAndCompare("span", sourceFolder, destinationFolder); |
| 93 | + } |
| 94 | + |
| 95 | + [NUnit.Framework.Test] |
| 96 | + public virtual void CheckStyledElementsAlignmentTest() { |
| 97 | + // TODO DEVSIX-3757 Update reference doc if the result matched the expected result |
| 98 | + ConvertToPdfAndCompare("styleAlignment", sourceFolder, destinationFolder); |
| 99 | + } |
| 100 | + |
| 101 | + [NUnit.Framework.Test] |
| 102 | + public virtual void CheckUnorderedListAlignmentTest() { |
| 103 | + ConvertToPdfAndCompare("unorderedList", sourceFolder, destinationFolder); |
| 104 | + } |
| 105 | + |
| 106 | + [NUnit.Framework.Test] |
| 107 | + public virtual void OrderedListAlignmentTest() { |
| 108 | + ConvertToPdfAndCompare("orderedList", sourceFolder, destinationFolder); |
| 109 | + } |
| 110 | + |
| 111 | + [NUnit.Framework.Test] |
| 112 | + public virtual void TableAlignmentTest() { |
| 113 | + ConvertToPdfAndCompare("table", sourceFolder, destinationFolder); |
| 114 | + } |
| 115 | + |
| 116 | + [NUnit.Framework.Test] |
| 117 | + public virtual void ButtonAlignmentTest() { |
| 118 | + ConvertToPdfAndCompare("button", sourceFolder, destinationFolder); |
| 119 | + } |
| 120 | + |
| 121 | + [NUnit.Framework.Test] |
| 122 | + public virtual void FormAlignmentTest() { |
| 123 | + // TODO DEVSIX-3757 Update reference doc if the result matched the expected result |
| 124 | + ConvertToPdfAndCompare("form", sourceFolder, destinationFolder); |
| 125 | + } |
| 126 | + |
| 127 | + [NUnit.Framework.Test] |
| 128 | + public virtual void HeaderAlignmentTest() { |
| 129 | + ConvertToPdfAndCompare("header", sourceFolder, destinationFolder); |
| 130 | + } |
| 131 | + |
| 132 | + [NUnit.Framework.Test] |
| 133 | + public virtual void ParagraphAlignmentTest() { |
| 134 | + ConvertToPdfAndCompare("paragraph", sourceFolder, destinationFolder); |
| 135 | + } |
| 136 | + |
| 137 | + [NUnit.Framework.Test] |
| 138 | + public virtual void AllStylesTest() { |
| 139 | + // TODO DEVSIX-3757 Update reference doc if the result matched the expected result |
| 140 | + ConvertToPdfAndCompare("AllStyles", sourceFolder, destinationFolder); |
| 141 | + } |
| 142 | + } |
| 143 | +} |
0 commit comments