diff --git a/doc-factory-test/src_test/ch/ivyteam/ivy/addons/docfactory/BaseDocFactoryGenerateDocumentsIT.java b/doc-factory-test/src_test/ch/ivyteam/ivy/addons/docfactory/BaseDocFactoryGenerateDocumentsIT.java index 1a5c2755..7bd20b94 100644 --- a/doc-factory-test/src_test/ch/ivyteam/ivy/addons/docfactory/BaseDocFactoryGenerateDocumentsIT.java +++ b/doc-factory-test/src_test/ch/ivyteam/ivy/addons/docfactory/BaseDocFactoryGenerateDocumentsIT.java @@ -44,12 +44,10 @@ public class BaseDocFactoryGenerateDocumentsIT { private DocumentTemplate documentTemplate1, documentTemplate2, documentTemplate3; - @SuppressWarnings("deprecation") @BeforeEach public void setUp() throws Exception { - docFactory = BaseDocFactory.getInstance() - .withDocumentCreationOptions( - DocumentCreationOptions.getInstance().withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true))); + docFactory = BaseDocFactory.getInstance().withDocumentCreationOptions(DocumentCreationOptions.getInstance() + .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true))); Person person = makePerson(); documentTemplate1 = DocumentTemplate.withTemplate(TEMPLATE_1).putDataAsSourceForSimpleMailMerge(person) diff --git a/doc-factory-test/src_test/ch/ivyteam/ivy/addons/docfactory/RemovingWhiteSpaceInPdfEditableFieldsIT.java b/doc-factory-test/src_test/ch/ivyteam/ivy/addons/docfactory/RemovingWhiteSpaceInPdfEditableFieldsIT.java index 03a8f266..aaf54013 100644 --- a/doc-factory-test/src_test/ch/ivyteam/ivy/addons/docfactory/RemovingWhiteSpaceInPdfEditableFieldsIT.java +++ b/doc-factory-test/src_test/ch/ivyteam/ivy/addons/docfactory/RemovingWhiteSpaceInPdfEditableFieldsIT.java @@ -31,7 +31,7 @@ public void setup() throws Exception { @Test public void defaultDoesNotRemoveWhiteSpaceInPdfEditableFields() { DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance() - .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true)); + .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true)); documentTemplate.withDocumentCreationOptions(documentCreationOptions); File resultFile = DocFactoryTest.makeFile( @@ -45,9 +45,8 @@ public void defaultDoesNotRemoveWhiteSpaceInPdfEditableFields() { @Test public void removeWhiteSpaceInPdfEditableFields() { - DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance() - .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true) - .hasToRemoveWhiteSpaceInPdfEditableFields(true)); + DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance().withPdfOptions( + PdfOptions.getInstance().hasToKeepFormFieldsEditable(true).hasToRemoveWhiteSpaceInPdfEditableFields(true)); documentTemplate.withDocumentCreationOptions(documentCreationOptions); File resultFile = makeFile( @@ -61,9 +60,8 @@ public void removeWhiteSpaceInPdfEditableFields() { @Test public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_fieldsNotEditable() { - DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance() - .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(false) - .hasToRemoveWhiteSpaceInPdfEditableFields(true)); + DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance().withPdfOptions( + PdfOptions.getInstance().hasToKeepFormFieldsEditable(false).hasToRemoveWhiteSpaceInPdfEditableFields(true)); documentTemplate.withDocumentCreationOptions(documentCreationOptions); File resultFile = makeFile( @@ -77,9 +75,8 @@ public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_fieldsNotEditab @Test public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_doc() { - DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance() - .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true) - .hasToRemoveWhiteSpaceInPdfEditableFields(true)); + DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance().withPdfOptions( + PdfOptions.getInstance().hasToKeepFormFieldsEditable(true).hasToRemoveWhiteSpaceInPdfEditableFields(true)); documentTemplate.withDocumentCreationOptions(documentCreationOptions); File resultFile = makeFile("test/documentTemplate/removingWhiteSpaceInPdfEditableFieldsIT/aDoc.doc"); @@ -92,9 +89,8 @@ public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_doc() @Test public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_docx() { - DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance() - .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true) - .hasToRemoveWhiteSpaceInPdfEditableFields(true)); + DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance().withPdfOptions( + PdfOptions.getInstance().hasToKeepFormFieldsEditable(true).hasToRemoveWhiteSpaceInPdfEditableFields(true)); documentTemplate.withDocumentCreationOptions(documentCreationOptions); File resultFile = makeFile("test/documentTemplate/removingWhiteSpaceInPdfEditableFieldsIT/aDocx.docx"); @@ -107,9 +103,8 @@ public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_docx( @Test public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_odt() { - DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance() - .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true) - .hasToRemoveWhiteSpaceInPdfEditableFields(true)); + DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance().withPdfOptions( + PdfOptions.getInstance().hasToKeepFormFieldsEditable(true).hasToRemoveWhiteSpaceInPdfEditableFields(true)); documentTemplate.withDocumentCreationOptions(documentCreationOptions); File resultFile = makeFile("test/documentTemplate/removingWhiteSpaceInPdfEditableFieldsIT/anOdt.odt"); @@ -122,9 +117,8 @@ public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_odt() @Test public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_html() { - DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance() - .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true) - .hasToRemoveWhiteSpaceInPdfEditableFields(true)); + DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance().withPdfOptions( + PdfOptions.getInstance().hasToKeepFormFieldsEditable(true).hasToRemoveWhiteSpaceInPdfEditableFields(true)); documentTemplate.withDocumentCreationOptions(documentCreationOptions); File resultFile = makeFile("test/documentTemplate/removingWhiteSpaceInPdfEditableFieldsIT/anHtml.html"); @@ -137,9 +131,8 @@ public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_html( @Test public void removeWhiteSpaceInPdfEditableFields_has_no_effect_if_output_is_txt() { - DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance() - .withPdfOptions(PdfOptions.getInstance().hasToKeepFormFieldsEditable(true) - .hasToRemoveWhiteSpaceInPdfEditableFields(true)); + DocumentCreationOptions documentCreationOptions = DocumentCreationOptions.getInstance().withPdfOptions( + PdfOptions.getInstance().hasToKeepFormFieldsEditable(true).hasToRemoveWhiteSpaceInPdfEditableFields(true)); documentTemplate.withDocumentCreationOptions(documentCreationOptions); File resultFile = makeFile("test/documentTemplate/removingWhiteSpaceInPdfEditableFieldsIT/aTxt.txt");