mirror of
https://github.com/sismics/docs.git
synced 2024-11-25 23:27:57 +01:00
#182: fix tests
This commit is contained in:
parent
94e18146fd
commit
dcb924abac
@ -28,7 +28,7 @@ public class TestFileUtil {
|
|||||||
File file = new File();
|
File file = new File();
|
||||||
file.setMimeType(MimeType.OPEN_DOCUMENT_TEXT);
|
file.setMimeType(MimeType.OPEN_DOCUMENT_TEXT);
|
||||||
Path pdfPath = PdfUtil.convertToPdf(file, path);
|
Path pdfPath = PdfUtil.convertToPdf(file, path);
|
||||||
String content = FileUtil.extractContent(null, file, path, pdfPath);
|
String content = FileUtil.extractContent("eng", file, path, pdfPath);
|
||||||
Assert.assertTrue(content.contains("Lorem ipsum dolor sit amen."));
|
Assert.assertTrue(content.contains("Lorem ipsum dolor sit amen."));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ public class TestFileUtil {
|
|||||||
File file = new File();
|
File file = new File();
|
||||||
file.setMimeType(MimeType.OFFICE_DOCUMENT);
|
file.setMimeType(MimeType.OFFICE_DOCUMENT);
|
||||||
Path pdfPath = PdfUtil.convertToPdf(file, path);
|
Path pdfPath = PdfUtil.convertToPdf(file, path);
|
||||||
String content = FileUtil.extractContent(null, file, path, pdfPath);
|
String content = FileUtil.extractContent("eng", file, path, pdfPath);
|
||||||
Assert.assertTrue(content.contains("Lorem ipsum dolor sit amen."));
|
Assert.assertTrue(content.contains("Lorem ipsum dolor sit amen."));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ public class TestFileUtil {
|
|||||||
Path path = Paths.get(ClassLoader.getSystemResource("file/udhr.pdf").toURI());
|
Path path = Paths.get(ClassLoader.getSystemResource("file/udhr.pdf").toURI());
|
||||||
File file = new File();
|
File file = new File();
|
||||||
file.setMimeType(MimeType.APPLICATION_PDF);
|
file.setMimeType(MimeType.APPLICATION_PDF);
|
||||||
String content = FileUtil.extractContent(null, file, path, path);
|
String content = FileUtil.extractContent("eng", file, path, path);
|
||||||
Assert.assertTrue(content.contains("All human beings are born free and equal in dignity and rights."));
|
Assert.assertTrue(content.contains("All human beings are born free and equal in dignity and rights."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user