Skip to content

Commit 7343ca3

Browse files
LodrKumquatpavel-alay
authored andcommitted
Add tests for edge cases
Update tests for bottom edge-cases Move regexp matching logic into another class Add left+right tests DEVSIX-2388 DEVSIX-1050 Autoported commit. Original commit hash: [42c90b77]
1 parent 9c03972 commit 7343ca3

File tree

32 files changed

+1004
-8
lines changed

32 files changed

+1004
-8
lines changed

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/media/page/PageMarginBoxIntegrationTests.cs

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,5 +234,104 @@ public virtual void RightCenterAndBottomTest() {
234234
public virtual void RightTopAndCenterAndBottomTest() {
235235
ConvertToPdfAndCompare("rightTopAndCenterAndBottom", sourceFolder, destinationFolder);
236236
}
237+
238+
//Edge-case test
239+
/// <exception cref="System.IO.IOException"/>
240+
/// <exception cref="System.Exception"/>
241+
[NUnit.Framework.Test]
242+
public virtual void LargeAutoLeftRegularCenterTopBottomTest() {
243+
ConvertToPdfAndCompare("largeAutoLeftRegularCenterTopBottomTest", sourceFolder, destinationFolder);
244+
}
245+
246+
/// <exception cref="System.IO.IOException"/>
247+
/// <exception cref="System.Exception"/>
248+
[NUnit.Framework.Test]
249+
public virtual void HugeAutoLeftTopBottomTest() {
250+
ConvertToPdfAndCompare("hugeAutoLeftTopBottomTest", sourceFolder, destinationFolder);
251+
}
252+
253+
/// <exception cref="System.IO.IOException"/>
254+
/// <exception cref="System.Exception"/>
255+
[NUnit.Framework.Test]
256+
public virtual void LargeAutoCenterRegularSidesTopBottomTest() {
257+
ConvertToPdfAndCompare("largeAutoCenterRegularSidesTopBottomTest", sourceFolder, destinationFolder);
258+
}
259+
260+
/// <exception cref="System.IO.IOException"/>
261+
/// <exception cref="System.Exception"/>
262+
[NUnit.Framework.Test]
263+
public virtual void LargeFixedLeftRegularCenterTopBottomTest() {
264+
ConvertToPdfAndCompare("largeFixedLeftRegularCenterTopBottomTest", sourceFolder, destinationFolder);
265+
}
266+
267+
/// <exception cref="System.IO.IOException"/>
268+
/// <exception cref="System.Exception"/>
269+
[NUnit.Framework.Test]
270+
public virtual void HugeFixedLeftTopBottomTest() {
271+
ConvertToPdfAndCompare("hugeFixedLeftTopBottomTest", sourceFolder, destinationFolder);
272+
}
273+
274+
/// <exception cref="System.IO.IOException"/>
275+
/// <exception cref="System.Exception"/>
276+
[NUnit.Framework.Test]
277+
public virtual void SmallFixedLeftTopBottomTest() {
278+
ConvertToPdfAndCompare("smallFixedLeftTopBottomTest", sourceFolder, destinationFolder);
279+
}
280+
281+
/// <exception cref="System.IO.IOException"/>
282+
/// <exception cref="System.Exception"/>
283+
[NUnit.Framework.Test]
284+
public virtual void LargeFixedCenterRegularSidesTopBottomTest() {
285+
ConvertToPdfAndCompare("largeFixedCenterRegularSidesTopBottomTest", sourceFolder, destinationFolder);
286+
}
287+
288+
/// <exception cref="System.IO.IOException"/>
289+
/// <exception cref="System.Exception"/>
290+
[NUnit.Framework.Test]
291+
public virtual void LargeAutoTopRegularCenterLeftRightTest() {
292+
ConvertToPdfAndCompare("largeAutoTopRegularCenterLeftRightTest", sourceFolder, destinationFolder);
293+
}
294+
295+
/// <exception cref="System.IO.IOException"/>
296+
/// <exception cref="System.Exception"/>
297+
[NUnit.Framework.Test]
298+
public virtual void HugeAutoTopLeftRightTest() {
299+
ConvertToPdfAndCompare("hugeAutoTopLeftRightTest", sourceFolder, destinationFolder);
300+
}
301+
302+
/// <exception cref="System.IO.IOException"/>
303+
/// <exception cref="System.Exception"/>
304+
[NUnit.Framework.Test]
305+
public virtual void LargeAutoCenterRegularSidesLeftRightTest() {
306+
ConvertToPdfAndCompare("largeAutoCenterRegularSidesLeftRightTest", sourceFolder, destinationFolder);
307+
}
308+
309+
/// <exception cref="System.IO.IOException"/>
310+
/// <exception cref="System.Exception"/>
311+
[NUnit.Framework.Test]
312+
public virtual void LargeFixedTopRegularCenterLeftRightTest() {
313+
ConvertToPdfAndCompare("largeFixedTopRegularCenterLeftRightTest", sourceFolder, destinationFolder);
314+
}
315+
316+
/// <exception cref="System.IO.IOException"/>
317+
/// <exception cref="System.Exception"/>
318+
[NUnit.Framework.Test]
319+
public virtual void HugeFixedTopLeftRightTest() {
320+
ConvertToPdfAndCompare("hugeFixedTopLeftRightTest", sourceFolder, destinationFolder);
321+
}
322+
323+
/// <exception cref="System.IO.IOException"/>
324+
/// <exception cref="System.Exception"/>
325+
[NUnit.Framework.Test]
326+
public virtual void SmallFixedTopLeftRightTest() {
327+
ConvertToPdfAndCompare("smallFixedTopLeftRightTest", sourceFolder, destinationFolder);
328+
}
329+
330+
/// <exception cref="System.IO.IOException"/>
331+
/// <exception cref="System.Exception"/>
332+
[NUnit.Framework.Test]
333+
public virtual void LargeFixedCenterRegularSidesLeftRightTest() {
334+
ConvertToPdfAndCompare("largeFixedCenterRegularSidesLeftRightTest", sourceFolder, destinationFolder);
335+
}
237336
}
238337
}

0 commit comments

Comments
 (0)