use of com.itextpdf.test.annotations.LogMessages in project i7j-pdfsweep by itext.
the class PdfCleanUpToolTest method incorrectBDCToBMCTest.
@Test
@LogMessages(messages = @LogMessage(messageTemplate = IoLogMessageConstant.PDF_REFERS_TO_NOT_EXISTING_PROPERTY_DICTIONARY))
public void incorrectBDCToBMCTest() throws IOException, InterruptedException {
String fileName = "incorrectBDCToBMCTest";
String input = INPUT_PATH + fileName + ".pdf";
String output = OUTPUT_PATH + fileName + ".pdf";
String cmp = INPUT_PATH + "cmp_" + fileName + ".pdf";
List<PdfCleanUpLocation> cleanUpLocations = Arrays.asList(new PdfCleanUpLocation(1, new Rectangle(0, 0, 10, 10), ColorConstants.RED));
cleanUp(input, output, cleanUpLocations);
compareByContent(cmp, output, OUTPUT_PATH, "diff_" + fileName);
}
use of com.itextpdf.test.annotations.LogMessages in project i7j-pdfsweep by itext.
the class PdfCleanUpToolTest method noninvertibleMatrixRemoveNothingTest.
@Test
@LogMessages(messages = @LogMessage(messageTemplate = CleanUpLogMessageConstant.FAILED_TO_PROCESS_A_TRANSFORMATION_MATRIX))
public void noninvertibleMatrixRemoveNothingTest() throws IOException, InterruptedException {
String fileName = "noninvertibleMatrixRemoveNothingTest";
String input = INPUT_PATH + "noninvertibleMatrix.pdf";
String output = OUTPUT_PATH + fileName + ".pdf";
String cmp = INPUT_PATH + "cmp_" + fileName + ".pdf";
PdfCleanUpLocation dummyLocation = new PdfCleanUpLocation(1, new Rectangle(0, 0, 0, 0), null);
cleanUp(input, output, Arrays.asList(dummyLocation));
compareByContent(cmp, output, OUTPUT_PATH, "diff_noninvertibleMatrixRemoveNothingTest");
}
Aggregations