use of org.eclipse.mylyn.docs.epub.ncx.NavPoint in project mylyn.docs by eclipse.
the class TestTOCGenerator method testCrazyStructure.
@Test
public void testCrazyStructure() throws ParserConfigurationException, SAXException, IOException {
String html = "<body><h3 id='h3-1'>test</h3><h2 id='h2-1'>test</h2><h1 id='h1-1'>test</h1></body>";
Ncx ncx = createNcx();
TOCGenerator.parse(new InputSource(new StringReader(html)), "test.html", ncx, 0);
EList<NavPoint> points = ncx.getNavMap().getNavPoints();
// "h3" will be created as a "h1" and "h2" added to it
assertEquals(2, points.size());
}
Aggregations