Created first test
This commit is contained in:
parent
80441c4ad9
commit
da9326a19e
4 changed files with 49 additions and 8 deletions
|
@ -1,20 +1,33 @@
|
|||
package w2phtml.regressionTests;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class TestExample {
|
||||
|
||||
@Test
|
||||
@DisplayName("Heading with page break before")
|
||||
public static void main(String[] args) throws Exception {
|
||||
//long start = System.nanoTime();
|
||||
|
||||
List<String> arguments = new ArrayList<String>();
|
||||
arguments.add("-page_break_style");
|
||||
arguments.add("height:3em;margin-top:1em;margin-bottom:1em;background-color:red;");
|
||||
arguments.add("-html5");
|
||||
arguments.add("/home/litvinovg/tmp/w2p-bug/test_5.odt");
|
||||
arguments.add("./testdocuments/input/heading_with_page_break_before.odt");
|
||||
arguments.add("./testdocuments/output/heading_with_page_break_before.html");
|
||||
w2phtml.Application.main(arguments.toArray(new String[0]));
|
||||
//long end = System.nanoTime();
|
||||
//long elapsedTime = end - start;
|
||||
//System.out.println(elapsedTime/1000000);
|
||||
// System.out.println("Working Directory = " + System.getProperty("user.dir"));
|
||||
File result = new File("./testdocuments/output/heading_with_page_break_before.html");
|
||||
File model = new File("./testdocuments/model/heading_with_page_break_before.html");
|
||||
// System.out.println(result.exists());
|
||||
// System.out.println(model.exists());
|
||||
assertTrue( FileUtils.contentEquals(result, model),"The files differ!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue