dont know about 1.2, but in 1.3 there is a constructor that takes an
instance of application, so you would do new WicketTester(new
MyApplication());

-igor


On Feb 6, 2008 9:11 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote:
> How to make it use my application subclass?
> WicketTester.set(Application application) trow this exception:
>
> wicket.WicketRuntimeException: Use Application.init() method for
> configuring your application object
>         at wicket.Application.getSettings(Application.java:606)
>         at wicket.Application.getDebugSettings(Application.java:449)
>         at 
> wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java:51)
>         at 
> wicket.protocol.http.AbstractHttpSessionStore.bind(AbstractHttpSessionStore.java:165)
>         at 
> wicket.protocol.http.MockWebApplication.setupRequestAndResponse(MockWebApplication.java:411)
>         at wicket.util.tester.WicketTester.startPage(WicketTester.java:230)
>         at AppTester.testHome(AppTester.java:56)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at junit.framework.TestCase.runTest(TestCase.java:164)
>         at junit.framework.TestCase.runBare(TestCase.java:130)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:120)
>         at junit.framework.TestSuite.runTest(TestSuite.java:230)
>         at junit.framework.TestSuite.run(TestSuite.java:225)
>         at 
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>         at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
>
>
>
> On Feb 6, 2008 1:55 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > you have to make wicket tester use _your_ application subclass
> >
> > -igor
> >
> >
> >
> > On Feb 6, 2008 8:50 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote:
> > > Hi all
> > >
> > > I'm writing test cases for my wicket application (1.2.6), and I'm
> > > having problems with the ResourceModel and StringResourceModel. It
> > > seems like when loaded by a WicketTester (with startPage method) these
> > > components doesn't load the global resource file
> > > "MyApplication.properties". If I put the key on a property file with
> > > the same name of the page, it works. When I run the same page in
> > > tomcat, it works fine.
> > >
> > >
> > > Thank you
> > > Marco
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to