@Test public void testContents() throws Exception { page = new ClassPage(node, null, null, rootFolder, context); page.render(); final Document doc = support.parse(output.getFile("Foo.html")); assertEquals( "el_method", support.findStr(doc, "/html/body/table[1]/tbody/tr[1]/td[1]/span/@class")); assertEquals("a()", support.findStr(doc, "/html/body/table[1]/tbody/tr[1]/td[1]/span")); assertEquals("b()", support.findStr(doc, "/html/body/table[1]/tbody/tr[2]/td[1]/span")); assertEquals("c()", support.findStr(doc, "/html/body/table[1]/tbody/tr[3]/td[1]/span")); }
@Test public void testGetLinkLabel() throws IOException { page = new ClassPage(node, null, null, rootFolder, context); assertEquals("Foo", page.getLinkLabel()); }
@Test public void testGetFileNameDefault() throws IOException { IClassCoverage defaultNode = new ClassCoverageImpl("Foo", 123, null, "java/lang/Object", null); page = new ClassPage(defaultNode, null, null, rootFolder, context); assertEquals("Foo.html", page.getFileName()); }
@Test public void testGetFileName() throws IOException { page = new ClassPage(node, null, null, rootFolder, context); assertEquals("Foo.html", page.getFileName()); }