Skip to content

Commit 84b8912

Browse files
pavel-alayitext-teamcity
authored andcommitted
Add a new table width tests
DEVSIX-1136 Autoported commit. Original commit hash: [7b0a4be]
1 parent 9b98b70 commit 84b8912

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

itext.tests/itext.layout.tests/itext/layout/TableTest.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,6 +1734,26 @@ public virtual void AutoLayoutTest02() {
17341734
, testName + "_diff"));
17351735
}
17361736

1737+
/// <exception cref="System.IO.IOException"/>
1738+
/// <exception cref="System.Exception"/>
1739+
[NUnit.Framework.Test]
1740+
public virtual void AutoLayoutTest03() {
1741+
String testName = "autoLayoutTest03.pdf";
1742+
String outFileName = destinationFolder + testName;
1743+
String cmpFileName = sourceFolder + "cmp_" + testName;
1744+
PdfDocument pdf = new PdfDocument(new PdfWriter(outFileName));
1745+
Document doc = new Document(pdf);
1746+
Table table = new Table(UnitValue.CreatePercentArray(new float[] { 1, 1, 1 }));
1747+
table.SetBorder(new SolidBorder(Color.RED, 100));
1748+
for (int i = 0; i < 3; i++) {
1749+
table.AddCell(new Cell().Add("Hello"));
1750+
}
1751+
doc.Add(table);
1752+
doc.Close();
1753+
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
1754+
, testName + "_diff"));
1755+
}
1756+
17371757
/// <exception cref="System.IO.IOException"/>
17381758
/// <exception cref="System.Exception"/>
17391759
[NUnit.Framework.Test]
Binary file not shown.

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d1613dff58e3bf7ff92664eac39ec7628ac916d2
1+
7b0a4be987e60090352475e4d9c897ff7f73aea9

0 commit comments

Comments
 (0)