Hi Ryan, I don't think you can test it like that unless you have a default constructor, and even then I don't think it will work (I'm a bit spotty on this). What I have always done is this:
tester.startPanel(new TestPanelSource () { Panel getTestPanel(final String panelId) { return new TestPanel(panelId); } }); Hope that fixes it for you. best, jim On 6/5/07, Ryan Sonnek <[EMAIL PROTECTED]> wrote: > I could use a little help here. I'm trying to write a unit test for > my component in wicketstuff-scriptaculous. The test runs in eclipse > just fine, but running "mvn test" causes a build failure. > > What is the correct way to test this? > > public class AjaxEditInPlaceLabelTest extends TestCase { > public void testModelIsNotEscaped() { > WicketTester tester = new WicketTester(); > tester.startPanel(TestPanel.class); > > tester.assertContains("me & you"); > } > } > > public class TestPanel extends Panel { > public TestPanel(String id) { > super(id); > add(new AjaxEditInPlaceLabel("label", new Model("me & you"))); > } > } > > > http://www.wicketstuff.org/bamboo/build/viewBuildLog.action?buildKey=WICKETSCRIPTACULOUS-TRUNK&buildNumber=49 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user