use of org.eclipse.mylyn.docs.epub.core.OPSPublication in project mylyn.docs by eclipse.
the class TestPublication method testPack_Empty.
/**
* Test method for {@link org.eclipse.mylyn.docs.epub.core.Publication#pack(java.io.File)}. An EPUB where only a
* single page has been added shall be packed without issues
*
* @throws Exception
*/
/* Bug 454932 - fix or remove failing EPUB test
@Test
public final void testPack_EPUB2() throws Exception {
oebps.addItem(new File("testdata/plain-page.xhtml"));
epub.add(oebps);
epub.pack(epubFile);
oebps.validateMetadata();
Report report = new DefaultReportImpl(epubFile.toString());
EpubCheck checker = new EpubCheck(epubFile, report);
System.out.println("Validating plain EPUB 2.0.1 file");
System.out.println("Using version " + EpubCheck.version() + " of EpubCheck.");
Assert.assertTrue(checker.validate());
}
*/
/**
* Test method for {@link org.eclipse.mylyn.docs.epub.core.Publication#pack(java.io.File)}. An EPUB with no content
* shall fail when packed.
*
* @throws Exception
*/
@Test
public final void testPack_Empty() throws Exception {
epub.add(new OPSPublication());
try {
epubFile.delete();
epub.pack(epubFile);
fail();
} catch (ValidationException e) {
}
}
use of org.eclipse.mylyn.docs.epub.core.OPSPublication in project mylyn.docs by eclipse.
the class TestEclipseTocImporter method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
oebps = new OPSPublication(logger);
}
Aggregations