Re: Testing wicket pages in project with maven structure
Hi, I am also having the same problem. My wicket pages (.java files and .html files) are in the same package e.g. se.myapp.web.pages etc. And I don't have any src/main/webapp/WEB-INF/html Directory in my workspace. Please help me to fix this problem. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Testing-wicket-pages-in-project-with-maven-structure-tp2244245p3005633.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Testing wicket pages in project with maven structure
I already tried that but failed. Only pass an instance of application class to the tester don't work. Is need configure the pom.xml too or put the html dir on build path. I resolved configuring the pom.xml as: false src/main/webapp/WEB-INF/html ** Thanks!
Re: Testing wicket pages in project with maven structure
pass an instance of your application class to the tester -igor On Sat, Jun 5, 2010 at 6:57 AM, Gustavo Henrique wrote: > Hi! > I'm trying using WicketTester but I got an error: > org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for > component 'br.com.ecommerce.wicket.pages.ContactPage' not found. > > I changed the html dir using the trick with PathStripperLocator class and > this works. But the test not found the html pages. > My WicketApplication class: > @Override > protected void init() { > super.init(); > IResourceSettings resourceSettings = getResourceSettings(); > resourceSettings.addResourceFolder("/WEB-INF/html"); > resourceSettings.setResourceStreamLocator(new > PathStripperLocator()); > } > > My simple test page in src/test/java: > > public class ContactPageTest extends TestCase { > private WicketTester tester; > public void setUp() { > tester = new WicketTester(new WicketApplication()); > } > > public void testMyPageBasicRender() { > tester.startPage(ContactPage.class); > tester.assertRenderedPage(ContactPage.class); > } > } > > So how do I test a wicket page? > > thanks! > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Testing wicket pages in project with maven structure
Hi! I'm trying using WicketTester but I got an error: org.apache.wicket.markup. MarkupNotFoundException: Markup of type 'html' for component 'br.com.ecommerce.wicket.pages.ContactPage' not found. I changed the html dir using the trick with PathStripperLocator class and this works. But the test not found the html pages. My WicketApplication class: @Override protected void init() { super.init(); IResourceSettings resourceSettings = getResourceSettings(); resourceSettings.addResourceFolder("/WEB-INF/html"); resourceSettings.setResourceStreamLocator(new PathStripperLocator()); } My simple test page in src/test/java: public class ContactPageTest extends TestCase { private WicketTester tester; public void setUp() { tester = new WicketTester(new WicketApplication()); } public void testMyPageBasicRender() { tester.startPage(ContactPage.class); tester.assertRenderedPage(ContactPage.class); } } So how do I test a wicket page? thanks!
Testing wicket pages in project with maven structure
Hi! I'm trying using WicketTester but I got an error: org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'br.com.ecommerce.wicket.pages.ContactPage' not found. I changed the html dir using the trick with PathStripperLocator class and this works. But the test not found the html pages. My WicketApplication class: @Override protected void init() { super.init(); IResourceSettings resourceSettings = getResourceSettings(); resourceSettings.addResourceFolder("/WEB-INF/html"); resourceSettings.setResourceStreamLocator(new PathStripperLocator()); } My simple test page in src/test/java: public class ContactPageTest extends TestCase { private WicketTester tester; public void setUp() { tester = new WicketTester(new WicketApplication()); } public void testMyPageBasicRender() { tester.startPage(ContactPage.class); tester.assertRenderedPage(ContactPage.class); } } So how do I test a wicket page? thanks!