validate("table.html", name(file.getMainSection()));
}
@Override
public void testTwoChapters() throws Exception {
XtextResourceSet set = get(XtextResourceSet.class);
Resource res = set.getResource(URI.createURI(ParserTest.TEST_FILE_DIR + "01-twoChapters.xdoc"), true);
Chapter chapter0 = (Chapter) ((XdocFile) getModel((XtextResource)res)).getMainSection();
res = set.getResource(URI.createURI(ParserTest.TEST_FILE_DIR + "02-twoChapters.xdoc"), true);
Chapter chapter1 = (Chapter) ((XdocFile) getModel((XtextResource)res)).getMainSection();
XdocFile file = (XdocFile) getModel((XtextResource)set.getResource(URI.createURI(ParserTest.TEST_FILE_DIR + "twoChaptersDoc.xdoc"), true));
Document doc = (Document) file.getMainSection();
for(int i = 0; i < doc.getChapters().size(); i++) {
Chapter chapter = doc.getChapters().get(i);
generate(chapter);
}