Skip to content

Commit 15e0653

Browse files
committed
fix test
1 parent 294d720 commit 15e0653

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
System.setProperty(PDFMatcher.class.getName() + ".lookForText", "true");
163163
Map<String, Object> result = ANALYZER.analyze(new File(filePath));
164164
assertNotNull(result);
@@ -179,6 +179,7 @@ void testContainsText(final String filePath, final boolean expected, final Strin
179179
}
180180
assertTrue(pdfDetails.containsKey(PDFMatcher.TEXT_LANGUAGE_CONFIDENCE_VALUES));
181181
}
182+
System.clearProperty(PDFMatcher.class.getName() + ".languageCheck");
182183
System.clearProperty(PDFMatcher.class.getName() + ".lookForText");
183184
}
184185

0 commit comments

Comments
 (0)