pass an instance of your application class to the tester

-igor

On Sat, Jun 5, 2010 at 6:57 AM, Gustavo Henrique <gustavo...@gmail.com> 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

Reply via email to