Re: Possibile bug in MockHttpServletRequest

2012-12-14 Thread Martin Grigorov
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

Re: Possibile bug in MockHttpServletRequest

2012-12-14 Thread Martin Grigorov
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

Re: Possibile bug in MockHttpServletRequest

2012-01-30 Thread Giovanni Cuccu
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

Re: Possibile bug in MockHttpServletRequest

2012-01-30 Thread Martin Grigorov
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

Possibile bug in MockHttpServletRequest

2012-01-30 Thread Giovanni Cuccu
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

Re: MockHttpServletRequest

2011-06-07 Thread Adam Gray
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.

Re: MockHttpServletRequest

2011-06-07 Thread Martin Grigorov
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

MockHttpServletRequest

2011-06-07 Thread Adam Gray
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

Extend MockHttpServletRequest for JUnit testing

2008-03-06 Thread mohan.shenoy
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