ATS-762: T-Core Legacy Part 2 - Legacy Pipeline additions (was: review failing legacy transforms) (#262)

* ATS-762: Add Tika unit test for pdf to csv

* ATS-762: Fix indentation

* ATS-762: Added 3 tests for simple pipepline. msg > txt, txt > doc, txt > odt, txt > rtf

* ATS-762: Added tests for libreofficeToPdf pipeline

* ATS-762: Addressed Jan's comment about not using asterisk when importing modules

* ATS-762: Changed comment to pdf-->csv to address Jan's comment on the PR

* task/ATS-762_T: noticed the txt mime type was wrong so fixed it

Co-authored-by: kristian <kristian.dimitrov@alfresco.com>
This commit is contained in:
Ayman Harake
2020-06-19 18:03:56 +01:00
committed by GitHub
parent 38f7a8cc9c
commit 14e70b9785
9 changed files with 51 additions and 3 deletions

View File

@@ -72,7 +72,15 @@ public class TikaTransformationIT
{
sourceFile = entry.getLeft();
targetExtension = entry.getMiddle();
targetMimetype = extensionMimetype.get(entry.getMiddle());
//Single test to cover pdf-->csv
if (sourceFile.contains("pdf") && targetExtension.contains("csv"))
{
targetMimetype = "text/csv";
}
else
{
targetMimetype = extensionMimetype.get(entry.getMiddle());
}
sourceMimetype = entry.getRight();
}
@@ -108,6 +116,9 @@ public class TikaTransformationIT
Triple.of("quick.numbers", "xhtml", "application/vnd.apple.numbers"),
Triple.of("quick.numbers", "xml", "application/vnd.apple.numbers")
),
Stream.of(
Triple.of("quick.pdf", "csv", "application/pdf")
),
allTargets("quick.odp", "application/vnd.oasis.opendocument.presentation"),
allTargets("quick.ods", "application/vnd.oasis.opendocument.spreadsheet"),
allTargets("quick.odt", "application/vnd.oasis.opendocument.text"),