@@ -66,6 +66,7 @@ This file is part of the iText (R) project.
6666import static org .junit .Assert .assertEquals ;
6767import static org .junit .Assert .assertFalse ;
6868import static org .junit .Assert .assertNotNull ;
69+ import static org .junit .Assert .assertNull ;
6970import static org .junit .Assert .assertTrue ;
7071
7172@ Category (IntegrationTest .class )
@@ -1254,13 +1255,17 @@ public void stampingTestWithTaggedStructure() throws IOException {
12541255
12551256 @ Test
12561257 public void stampingTestWithFullCompression01 () throws IOException , InterruptedException {
1258+ String outPdf = destinationFolder + "stampingTestWithFullCompression01.pdf" ;
1259+ String cmpPdf = sourceFolder + "cmp_stampingTestWithFullCompression01.pdf" ;
12571260 PdfDocument pdfDoc = new PdfDocument (new PdfReader (sourceFolder + "fullCompressedDocument.pdf" ),
1258- new PdfWriter (destinationFolder + "stampingTestWithFullCompression01.pdf" ));
1261+ new PdfWriter (outPdf ));
12591262 pdfDoc .close ();
1260- float result = new File (destinationFolder + "stampingTestWithFullCompression01.pdf" ).length ();
1261- float expected = new File (sourceFolder + "cmp_stampingTestWithFullCompression01.pdf" ).length ();
1263+ float result = new File (outPdf ).length ();
1264+ float expected = new File (cmpPdf ).length ();
12621265 float coef = Math .abs ((expected - result ) / expected );
1266+ String compareRes = new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder );
12631267 assertTrue (coef < 0.01 );
1268+ assertNull (compareRes );
12641269 }
12651270
12661271 @ Test
0 commit comments