You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk> on 2008/01/02 08:28:18 UTC

Re: Wickettester and session?

Bump on this one..

Nino Saturnino Martinez Vazquez Wael wrote:
> Hi
>
> There seems to be a problem with wicket tester and the session created 
> (I use my own custom session). I create the wicket tester like this:
>
>        final ApplicationContext context = new 
> ClassPathXmlApplicationContext(
>                "applicationContext.xml");
>        IDBDao base = (IDBDao) context.getBean("dBDao");
>        dbProvider = base;
>        base.generateDummyData();
>        // 2. setup mock injection environment
>        AnnotApplicationContextMock appctx = new 
> AnnotApplicationContextMock();
>        appctx.putBean("dBDao", dbProvider);
>
>        wicketTester = new WicketTester(ZeuzGroupApplication.class);
>              WebApplication app = wicketTester.getApplication();
>
>        app.addComponentInstantiationListener(new 
> SpringComponentInjector(app,
>                appctx));
>
> The application works fine without testing. But I get a class cast 
> exception when testing, since the session arent my custom one, heres 
> how I instantiate new sessions in my webapplication:
>
>    @Override
>    public Session newSession(Request request, Response response) {
>        ZeuzSession zeuzSession = new ZeuzSession(this, request);
>        return zeuzSession;
>    }
>
> -regards Nino
>

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Here it is,

https://issues.apache.org/jira/browse/WICKET-1256

Thanks for reminding me.

Eelco Hillenius wrote:
> On Jan 2, 2008 2:28 PM, Nino Saturnino Martinez Vazquez Wael
> <ni...@jayway.dk> wrote:
>   
>> Bump on this one..
>>     
>
> If no-one is reacting, you can best open a JIRA issue for it. It helps
> to have a test case that proves the issue attached to it.
>
> Cheers,
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>   

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Eelco Hillenius <ee...@gmail.com>.
On Jan 2, 2008 2:28 PM, Nino Saturnino Martinez Vazquez Wael
<ni...@jayway.dk> wrote:
> Bump on this one..

If no-one is reacting, you can best open a JIRA issue for it. It helps
to have a test case that proves the issue attached to it.

Cheers,

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org