public void testAsWikiText() throws Exception { final String PATH_WIDGET = "!path some.path"; ClasspathWidget w = new ClasspathWidget(new MockWidgetRoot(), PATH_WIDGET); assertEquals(PATH_WIDGET, w.asWikiText()); }
public void testHtml() throws Exception { ClasspathWidget widget = new ClasspathWidget(new MockWidgetRoot(), "!path some.path"); Pattern p = Pattern.compile("classpath: some.path"); Matcher match = p.matcher(widget.render()); assertTrue("pattern not found", match.find()); }