Skip to content

Commit e0ad60d

Browse files
committed
fix test
1 parent f7839f3 commit e0ad60d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/test/java/TestPDFMatcher.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ void numberOfPagesPortableCollectionPdf() throws IOException {
129129
@ParameterizedTest
130130
@CsvFileSource(resources = "/pdf/signed.csv", numLinesToSkip = 1)
131131
void testSignedPDFs(final String urlString, final int expectedSignatureCount) throws IOException {
132-
System.setProperty(PDFMatcher.class.getName() + ".languageCheck", "true");
133132
final Map<String, Object> result = ANALYZER.analyze(new URL(urlString).openStream());
134133
assertNotNull(result);
135134
assertThat(result, hasKey(PDFMatcher.DETAILS_KEY));
@@ -159,6 +158,7 @@ void testSignedPDFs(final String urlString, final int expectedSignatureCount) th
159158
@ParameterizedTest
160159
@CsvFileSource(resources = "/pdf/contains-text.csv", numLinesToSkip = 1)
161160
void testContainsText(final String filePath, final boolean expected, final String language) throws IOException {
161+
System.setProperty(PDFMatcher.class.getName() + ".languageCheck", "true");
162162
Map<String, Object> result = ANALYZER.analyze(new File(filePath));
163163
assertNotNull(result);
164164
assertTrue(result.containsKey(PDFMatcher.DETAILS_KEY));
@@ -178,6 +178,7 @@ void testContainsText(final String filePath, final boolean expected, final Strin
178178
}
179179
assertTrue(pdfDetails.containsKey(PDFMatcher.TEXT_LANGUAGE_CONFIDENCE_VALUES));
180180
}
181+
System.clearProperty(PDFMatcher.class.getName() + ".languageCheck");
181182
}
182183

183184
private static File[] nullSafe(final File[] filesOrNull) {

0 commit comments

Comments
 (0)