* Sven Schliesing: > Hi, > > I just came across the following error: > junit.framework.AssertionFailedError: expected:<WebTestPage> but > was:<DummyHomePage> > > To narrow it down I created a simple Testclass with the according html. > I also added a test case. Here we go: > > WebTestPage.java: > ------------- > [...] > > public class WebTestPage extends WebPage { > > public WebTestPage() { > Model icon; > icon = new Model("gfx/offline.gif"); > add(new Image("statusImage", icon)); > } > > } > ------------- > > WebTestPage.html: > ------------- > <html> > <head></head> > <body> > <img wicket:id="statusImage" border="0" /> > </body> > </html> > ------------- > > WebTestPageTest.java: > ------------- > [...] > > public class WebTestPageTest { > > private WicketTester tester = new WicketTester(); > > @Test > public void simpleTest() throws Exception { > WebTestPage page = new WebTestPage(); > tester.startPage(page); > tester.assertRenderedPage(WebTestPage.class); > } > > }
As a quick workaround you can do this: tester.startPage(WebTestPage.class); Does it work? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ ------------------------------------------------------------------------- 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