See the testing section here
http://cwiki.apache.org/WICKET/spring.html#Spring-UnitTestingtheProxyApproach

For testing spring.

Basically you make a context, and add it to the app.  You can load it up
with whatever real/mock beans you need.

Rgds

Ned



Eyal Golan wrote:
> 
> Thanks.
> I actually tried but got an error that it could not find the application
> context (we use Spring).
> 
> java.lang.IllegalStateException: No WebApplicationContext found: no
> ContextLoaderListener registered?
> 
> Instead this is what I did:
>         tester = new WicketTester(new WebApplication() {
>             @Override
>             public Session newSession(Request request, Response response)
> {
>                 return new PortalSession(request);
>             }
> 
>             @Override
>             public Class getHomePage() {
>                 // TODO Auto-generated method stub
>                 return null;
>             }
> 
>         });
> 
> What do you think?
> 

-- 
View this message in context: 
http://www.nabble.com/Testing-using-WicketTester-tp17403637p17404126.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to