e my WicketTester turned back
> my test to green..
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Possibile-bug-in-MockHttpServletRequest-tp4340419p4654823.html
&g
n" is an instance of MockHttpSession, the first "if" is never
> executed with boolean "false" and so also the second one..thus session
> remain null.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.na
ns the current session associated with this request, or if the request
> does not have a session, creates one.
>
> So as far as I understand
> httpRequest.getSession(); and httpRequest.getSession(true); are equivalent
>
> If my assumption is correct the MockHttpServletRequest i
e a session, creates one.
>
> So as far as I understand
> httpRequest.getSession(); and httpRequest.getSession(true); are equivalent
>
> If my assumption is correct the MockHttpServletRequest implementation is
> incorrect since it returns null in my case.
> The code in the mock class is the fo
getSession()
Returns the current session associated with this request, or if the
request does not have a session, creates one.
So as far as I understand
httpRequest.getSession(); and httpRequest.getSession(true); are equivalent
If my assumption is correct the MockHttpServletRequest implementation is
Will do, thanks.
On Tue, Jun 7, 2011 at 10:23 AM, Martin Grigorov wrote:
> Looking at the code I see a lot of things are not possible to
> configure in this area.
> The easiest way to allow what you need is to add #setHeader(name,
> value) which will override the previous value(s) for this name.
Looking at the code I see a lot of things are not possible to
configure in this area.
The easiest way to allow what you need is to add #setHeader(name,
value) which will override the previous value(s) for this name.
Please create a ticket.
On Tue, Jun 7, 2011 at 4:11 PM, Adam Gray wrote:
> My ap
My application's base page does checking against the user agent string to
redirect unsupported browsers to a "support" page. The problem we're seeing
is that WicketTester is using a hardcoded user agent from a crazy-old
version of firefox.
Is there any recommended way to specify the user-agent us
Is it possible to extend MockHttpServletRequest for JUnit testing? If yes,
how? In particular I want to override the isUserInRole method.
--Mohan
--
View this message in context:
http://www.nabble.com/Extend-MockHttpServletRequest-for-JUnit-testing-tp15890465p15890465.html
Sent from the