|
| 1 | +using System; |
| 2 | +using iText.Html2pdf; |
| 3 | + |
| 4 | +namespace iText.Html2pdf.Css.Media.Page.Fix_dimension { |
| 5 | + public class PageMarginBoxFixDimensionTests : ExtendedHtmlConversionITextTest { |
| 6 | + public static readonly String sourceFolder = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext |
| 7 | + .CurrentContext.TestDirectory) + "/resources/itext/html2pdf/css/media/page/fix_dimension/"; |
| 8 | + |
| 9 | + public static readonly String destinationFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory |
| 10 | + + "/test/itext/html2pdf/css/media/page/fix_dimension/"; |
| 11 | + |
| 12 | + [NUnit.Framework.OneTimeSetUp] |
| 13 | + public static void BeforeClass() { |
| 14 | + CreateOrClearDestinationFolder(destinationFolder); |
| 15 | + } |
| 16 | + |
| 17 | + // Top margin box tests |
| 18 | + /// <exception cref="System.IO.IOException"/> |
| 19 | + /// <exception cref="System.Exception"/> |
| 20 | + [NUnit.Framework.Test] |
| 21 | + public virtual void TopOnlyLeftFixPxTest() { |
| 22 | + ConvertToPdfAndCompare("topOnlyLeftFixPx", sourceFolder, destinationFolder); |
| 23 | + } |
| 24 | + |
| 25 | + /// <exception cref="System.IO.IOException"/> |
| 26 | + /// <exception cref="System.Exception"/> |
| 27 | + [NUnit.Framework.Test] |
| 28 | + public virtual void TopOnlyLeftFixPtTest() { |
| 29 | + ConvertToPdfAndCompare("topOnlyLeftFixPt", sourceFolder, destinationFolder); |
| 30 | + } |
| 31 | + |
| 32 | + /// <exception cref="System.IO.IOException"/> |
| 33 | + /// <exception cref="System.Exception"/> |
| 34 | + [NUnit.Framework.Test] |
| 35 | + public virtual void TopOnlyLeftFixPercentTest() { |
| 36 | + ConvertToPdfAndCompare("topOnlyLeftFixPercent", sourceFolder, destinationFolder); |
| 37 | + } |
| 38 | + |
| 39 | + /// <exception cref="System.IO.IOException"/> |
| 40 | + /// <exception cref="System.Exception"/> |
| 41 | + [NUnit.Framework.Test] |
| 42 | + public virtual void TopOnlyLeftFixInTest() { |
| 43 | + ConvertToPdfAndCompare("topOnlyLeftFixIn", sourceFolder, destinationFolder); |
| 44 | + } |
| 45 | + |
| 46 | + /// <exception cref="System.IO.IOException"/> |
| 47 | + /// <exception cref="System.Exception"/> |
| 48 | + [NUnit.Framework.Test] |
| 49 | + public virtual void TopOnlyLeftFixCmTest() { |
| 50 | + ConvertToPdfAndCompare("topOnlyLeftFixCm", sourceFolder, destinationFolder); |
| 51 | + } |
| 52 | + |
| 53 | + /// <exception cref="System.IO.IOException"/> |
| 54 | + /// <exception cref="System.Exception"/> |
| 55 | + [NUnit.Framework.Test] |
| 56 | + public virtual void TopOnlyLeftFixMmTest() { |
| 57 | + ConvertToPdfAndCompare("topOnlyLeftFixMm", sourceFolder, destinationFolder); |
| 58 | + } |
| 59 | + |
| 60 | + /// <exception cref="System.IO.IOException"/> |
| 61 | + /// <exception cref="System.Exception"/> |
| 62 | + [NUnit.Framework.Test] |
| 63 | + public virtual void TopOnlyLeftFixPcTest() { |
| 64 | + ConvertToPdfAndCompare("topOnlyLeftFixPc", sourceFolder, destinationFolder); |
| 65 | + } |
| 66 | + |
| 67 | + /// <exception cref="System.IO.IOException"/> |
| 68 | + /// <exception cref="System.Exception"/> |
| 69 | + [NUnit.Framework.Test] |
| 70 | + public virtual void TopOnlyLeftFixEmTest() { |
| 71 | + ConvertToPdfAndCompare("topOnlyLeftFixEm", sourceFolder, destinationFolder); |
| 72 | + } |
| 73 | + |
| 74 | + /// <exception cref="System.IO.IOException"/> |
| 75 | + /// <exception cref="System.Exception"/> |
| 76 | + [NUnit.Framework.Test] |
| 77 | + public virtual void TopOnlyLeftFixExTest() { |
| 78 | + ConvertToPdfAndCompare("topOnlyLeftFixEx", sourceFolder, destinationFolder); |
| 79 | + } |
| 80 | + |
| 81 | + /// <exception cref="System.IO.IOException"/> |
| 82 | + /// <exception cref="System.Exception"/> |
| 83 | + [NUnit.Framework.Test] |
| 84 | + public virtual void TopOnlyRightFixPercentTest() { |
| 85 | + ConvertToPdfAndCompare("topOnlyRightFixPercent", sourceFolder, destinationFolder); |
| 86 | + } |
| 87 | + |
| 88 | + /// <exception cref="System.IO.IOException"/> |
| 89 | + /// <exception cref="System.Exception"/> |
| 90 | + [NUnit.Framework.Test] |
| 91 | + public virtual void TopOnlyCenterFixPercentTest() { |
| 92 | + ConvertToPdfAndCompare("topOnlyCenterFixPercent", sourceFolder, destinationFolder); |
| 93 | + } |
| 94 | + |
| 95 | + /// <exception cref="System.IO.IOException"/> |
| 96 | + /// <exception cref="System.Exception"/> |
| 97 | + [NUnit.Framework.Test] |
| 98 | + public virtual void TopFixCenterAndRightTest() { |
| 99 | + ConvertToPdfAndCompare("topFixCenterAndRight", sourceFolder, destinationFolder); |
| 100 | + } |
| 101 | + |
| 102 | + /// <exception cref="System.IO.IOException"/> |
| 103 | + /// <exception cref="System.Exception"/> |
| 104 | + [NUnit.Framework.Test] |
| 105 | + public virtual void TopFixLeftAndFixCenterTest() { |
| 106 | + ConvertToPdfAndCompare("topFixLeftAndFixCenter", sourceFolder, destinationFolder); |
| 107 | + } |
| 108 | + |
| 109 | + /// <exception cref="System.IO.IOException"/> |
| 110 | + /// <exception cref="System.Exception"/> |
| 111 | + [NUnit.Framework.Test] |
| 112 | + public virtual void TopFixLeftAndRight() { |
| 113 | + ConvertToPdfAndCompare("topFixLeftAndRight", sourceFolder, destinationFolder); |
| 114 | + } |
| 115 | + |
| 116 | + /// <exception cref="System.IO.IOException"/> |
| 117 | + /// <exception cref="System.Exception"/> |
| 118 | + [NUnit.Framework.Test] |
| 119 | + public virtual void TopFixLeftAndFixCenterAndFixRight() { |
| 120 | + ConvertToPdfAndCompare("topFixLeftAndFixCenterAndFixRight", sourceFolder, destinationFolder); |
| 121 | + } |
| 122 | + |
| 123 | + //Left margin box tests |
| 124 | + /// <exception cref="System.IO.IOException"/> |
| 125 | + /// <exception cref="System.Exception"/> |
| 126 | + [NUnit.Framework.Test] |
| 127 | + public virtual void LeftOnlyFixTopTest() { |
| 128 | + ConvertToPdfAndCompare("leftOnlyFixTop", sourceFolder, destinationFolder); |
| 129 | + } |
| 130 | + |
| 131 | + /// <exception cref="System.IO.IOException"/> |
| 132 | + /// <exception cref="System.Exception"/> |
| 133 | + [NUnit.Framework.Test] |
| 134 | + public virtual void LeftOnlyFixCenterTest() { |
| 135 | + ConvertToPdfAndCompare("leftOnlyFixCenter", sourceFolder, destinationFolder); |
| 136 | + } |
| 137 | + |
| 138 | + /// <exception cref="System.IO.IOException"/> |
| 139 | + /// <exception cref="System.Exception"/> |
| 140 | + [NUnit.Framework.Test] |
| 141 | + public virtual void LeftOnlyFixBottomTest() { |
| 142 | + ConvertToPdfAndCompare("leftOnlyFixBottom", sourceFolder, destinationFolder); |
| 143 | + } |
| 144 | + |
| 145 | + /// <exception cref="System.IO.IOException"/> |
| 146 | + /// <exception cref="System.Exception"/> |
| 147 | + [NUnit.Framework.Test] |
| 148 | + public virtual void LeftTopAndFixCenterTest() { |
| 149 | + ConvertToPdfAndCompare("leftTopAndFixCenter", sourceFolder, destinationFolder); |
| 150 | + } |
| 151 | + |
| 152 | + /// <exception cref="System.IO.IOException"/> |
| 153 | + /// <exception cref="System.Exception"/> |
| 154 | + [NUnit.Framework.Test] |
| 155 | + public virtual void LeftTopAndFixBottomTest() { |
| 156 | + ConvertToPdfAndCompare("leftTopAndFixBottom", sourceFolder, destinationFolder); |
| 157 | + } |
| 158 | + |
| 159 | + /// <exception cref="System.IO.IOException"/> |
| 160 | + /// <exception cref="System.Exception"/> |
| 161 | + [NUnit.Framework.Test] |
| 162 | + public virtual void LeftFixCenterAndBottomTest() { |
| 163 | + ConvertToPdfAndCompare("leftFixCenterAndBottom", sourceFolder, destinationFolder); |
| 164 | + } |
| 165 | + |
| 166 | + /// <exception cref="System.IO.IOException"/> |
| 167 | + /// <exception cref="System.Exception"/> |
| 168 | + [NUnit.Framework.Test] |
| 169 | + public virtual void LeftFixTopAndFixCenterAndBottomTest() { |
| 170 | + ConvertToPdfAndCompare("leftFixTopAndFixCenterAndBottom", sourceFolder, destinationFolder); |
| 171 | + } |
| 172 | + } |
| 173 | +} |
0 commit comments