mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
Fix Junit for Unix systems
This commit is contained in:
parent
7708f61343
commit
24d8784e1b
@ -25,7 +25,8 @@ public class TestFileUtil {
|
|||||||
File file = new File();
|
File file = new File();
|
||||||
file.setMimeType(MimeType.OPEN_DOCUMENT_TEXT);
|
file.setMimeType(MimeType.OPEN_DOCUMENT_TEXT);
|
||||||
try (InputStream pdfInputStream = FileUtil.convertToPdf(bytesInputStream, file)) {
|
try (InputStream pdfInputStream = FileUtil.convertToPdf(bytesInputStream, file)) {
|
||||||
Assert.assertEquals("Lorem ipsum dolor sit amen.\r\n", FileUtil.extractContent(null, file, inputStream, pdfInputStream));
|
String content = FileUtil.extractContent(null, file, inputStream, pdfInputStream);
|
||||||
|
Assert.assertTrue(content.contains("Lorem ipsum dolor sit amen."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +38,8 @@ public class TestFileUtil {
|
|||||||
File file = new File();
|
File file = new File();
|
||||||
file.setMimeType(MimeType.OFFICE_DOCUMENT);
|
file.setMimeType(MimeType.OFFICE_DOCUMENT);
|
||||||
try (InputStream pdfInputStream = FileUtil.convertToPdf(bytesInputStream, file)) {
|
try (InputStream pdfInputStream = FileUtil.convertToPdf(bytesInputStream, file)) {
|
||||||
Assert.assertEquals("Lorem ipsum dolor sit amen.\r\n", FileUtil.extractContent(null, file, inputStream, pdfInputStream));
|
String content = FileUtil.extractContent(null, file, inputStream, pdfInputStream);
|
||||||
|
Assert.assertTrue(content.contains("Lorem ipsum dolor sit amen."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user