Fix Junit for Unix systems

This commit is contained in:
jendib 2015-12-11 22:22:21 +01:00
parent 7708f61343
commit 24d8784e1b

View File

@ -25,7 +25,8 @@ public class TestFileUtil {
File file = new File();
file.setMimeType(MimeType.OPEN_DOCUMENT_TEXT);
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.setMimeType(MimeType.OFFICE_DOCUMENT);
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."));
}
}
}