@@ -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