@@ -66,6 +66,7 @@ This file is part of the iText (R) project.
66
66
import static org .junit .Assert .assertEquals ;
67
67
import static org .junit .Assert .assertFalse ;
68
68
import static org .junit .Assert .assertNotNull ;
69
+ import static org .junit .Assert .assertNull ;
69
70
import static org .junit .Assert .assertTrue ;
70
71
71
72
@ Category (IntegrationTest .class )
@@ -1254,13 +1255,17 @@ public void stampingTestWithTaggedStructure() throws IOException {
1254
1255
1255
1256
@ Test
1256
1257
public void stampingTestWithFullCompression01 () throws IOException , InterruptedException {
1258
+ String outPdf = destinationFolder + "stampingTestWithFullCompression01.pdf" ;
1259
+ String cmpPdf = sourceFolder + "cmp_stampingTestWithFullCompression01.pdf" ;
1257
1260
PdfDocument pdfDoc = new PdfDocument (new PdfReader (sourceFolder + "fullCompressedDocument.pdf" ),
1258
- new PdfWriter (destinationFolder + "stampingTestWithFullCompression01.pdf" ));
1261
+ new PdfWriter (outPdf ));
1259
1262
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 ();
1262
1265
float coef = Math .abs ((expected - result ) / expected );
1266
+ String compareRes = new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder );
1263
1267
assertTrue (coef < 0.01 );
1268
+ assertNull (compareRes );
1264
1269
}
1265
1270
1266
1271
@ Test
0 commit comments