You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jonnie <jw...@gmail.com> on 2007/10/01 10:31:04 UTC

Using WicketTester with a custom WebSession

Hello

I'm fairly new to Wicket so forgive me if the answer is obvious and I've
missed something.

When I use WicketTester to test my Wicket application it always complains
about casting the session, I understand this to be because the WicketTester
uses a MockSession. Is there any way I can change the WicketTester to handle
my custom session so I can run my unit tests?

Regards

Jonathan Franklin
-- 
View this message in context: http://www.nabble.com/Using-WicketTester-with-a-custom-WebSession-tf4546811.html#a12974932
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Using WicketTester with a custom WebSession

Posted by Rüdiger Schulz <ru...@googlemail.com>.
At least in 1.3 you can pass it to the constructor. Don't know for 1.2
though. You can try the archive at nabble.

2007/10/1, Jonnie <jw...@gmail.com>:
>
> No I don't provide my custom application to the tester. I've had a look at
> the API, how do I provide this to the tester?
>
>
>
> Rüdiger_Schulz wrote:
> >
> > 2007/10/1, Jonnie <jw...@gmail.com>:
> >>
> >>
> >> Hello
> >>
> >> I'm fairly new to Wicket so forgive me if the answer is obvious and I've
> >> missed something.
> >>
> >> When I use WicketTester to test my Wicket application it always complains
> >> about casting the session, I understand this to be because the
> >> WicketTester
> >> uses a MockSession. Is there any way I can change the WicketTester to
> >> handle
> >> my custom session so I can run my unit tests?
> >
> >
> >
> > Do you provide your custom Application to the WicketTester?
> >
> >
> > --
> > greetings from Berlin,
> >
> > Rüdiger Schulz
> >
> > www.2rue.de
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Using-WicketTester-with-a-custom-WebSession-tf4546811.html#a12975600
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
greetings from Berlin,

Rüdiger Schulz

www.2rue.de

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


Re: Using WicketTester with a custom WebSession

Posted by Jonnie <jw...@gmail.com>.
No I don't provide my custom application to the tester. I've had a look at
the API, how do I provide this to the tester?



Rüdiger_Schulz wrote:
> 
> 2007/10/1, Jonnie <jw...@gmail.com>:
>>
>>
>> Hello
>>
>> I'm fairly new to Wicket so forgive me if the answer is obvious and I've
>> missed something.
>>
>> When I use WicketTester to test my Wicket application it always complains
>> about casting the session, I understand this to be because the
>> WicketTester
>> uses a MockSession. Is there any way I can change the WicketTester to
>> handle
>> my custom session so I can run my unit tests?
> 
> 
> 
> Do you provide your custom Application to the WicketTester?
> 
> 
> -- 
> greetings from Berlin,
> 
> Rüdiger Schulz
> 
> www.2rue.de
> 
> 

-- 
View this message in context: http://www.nabble.com/Using-WicketTester-with-a-custom-WebSession-tf4546811.html#a12975600
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Using WicketTester with a custom WebSession

Posted by Rüdiger Schulz <ru...@googlemail.com>.
2007/10/1, Jonnie <jw...@gmail.com>:
>
>
> Hello
>
> I'm fairly new to Wicket so forgive me if the answer is obvious and I've
> missed something.
>
> When I use WicketTester to test my Wicket application it always complains
> about casting the session, I understand this to be because the
> WicketTester
> uses a MockSession. Is there any way I can change the WicketTester to
> handle
> my custom session so I can run my unit tests?



Do you provide your custom Application to the WicketTester?


-- 
greetings from Berlin,

Rüdiger Schulz

www.2rue.de