Skip to content

Commit 2ffc394

Browse files
committed
Fix android tests
DEVSIX-8612
1 parent fa73740 commit 2ffc394

File tree

6 files changed

+9
-4
lines changed

6 files changed

+9
-4
lines changed

kernel/src/test/java/com/itextpdf/kernel/crypto/securityhandler/StandardHandlerUsingAesGcmTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,13 @@ public void testSimpleEncryptDecryptPdf15Test() throws Exception {
109109
ignore = true))
110110
public void testKnownOutput() throws Exception {
111111
String srcFile = SRC + "encryptedDocument.pdf";
112+
String outFile = DEST + "encryptedDocument.pdf";
112113
String cmpFile = SRC + "simpleDocument.pdf";
113-
tryCompare(srcFile, cmpFile);
114+
try (PdfDocument ignored = new PdfDocument(new PdfReader(srcFile, new ReaderProperties()
115+
.setPassword("supersecret".getBytes(StandardCharsets.UTF_8))), new PdfWriter(outFile))) {
116+
// We need to copy the source file to the destination folder to be able to compare pdf files in android.
117+
}
118+
tryCompare(outFile, cmpFile);
114119
}
115120

116121
// In all these tampered files, the stream content of object 14 has been modified.

layout/src/test/java/com/itextpdf/layout/FixedHeightTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ This file is part of the iText (R) project.
4545
@Tag("IntegrationTest")
4646
public class FixedHeightTest extends ExtendedITextTest {
4747

48-
private static final String sourceFolder = "./src/test/resources/com/itextpdf/layout/FloatAndAlignmentTest/";
49-
private static final String destinationFolder = "./target/test/com/itextpdf/layout/FloatAndAlignmentTest/";
48+
private static final String sourceFolder = "./src/test/resources/com/itextpdf/layout/FixedHeightTest/";
49+
private static final String destinationFolder = "./target/test/com/itextpdf/layout/FixedHeightTest/";
5050

5151
private static final String textByron =
5252
"When a man hath no freedom to fight for at home,\n" +

pdfa/src/test/java/com/itextpdf/pdfa/checker/PdfA4MetaDataTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This file is part of the iText (R) project.
6262
@Tag("IntegrationTest")
6363
public class PdfA4MetaDataTest extends ExtendedITextTest {
6464

65-
private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/pdfa/PdfA4ActionCheckTest/";
65+
private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/pdfa/PdfA4MetaDataTest/";
6666

6767
private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/pdfa/";
6868

pdfua/src/test/resources/com/itextpdf/pdfua/PdfUAMetadataUnitTest/result.pdf

Whitespace-only changes.

0 commit comments

Comments
 (0)