Commit f8db20ca authored by Raghav Khanna's avatar Raghav Khanna

Add tests to check file contain likely the correct contents

parent 5ba3285e
Pipeline #114243 failed with stages
in 24 seconds
......@@ -27,8 +27,16 @@ public class FileGenerateTest {
@Test
public void reasonableNameForPdfFile() throws Exception {
assertTrue(HtmlConverter.stringToPdfFile("tony", "test")
.getName()
.matches("tony[0-9]+.pdf"));
assertTrue(HtmlConverter.stringToPdfFile("tony", "test").getName().matches("tony[0-9]+.pdf"));
}
@Test
public void fileSizePdf() throws Exception {
assertTrue(HtmlConverter.stringToPdfFile("tony", "test").length() == 44102);
}
@Test
public void fileSizeMd() throws Exception {
assertTrue(HtmlConverter.stringToMdFile("konstantinos", "test").length() == 20);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment