wicket-guice HttpServletRequest

2013-06-03 Thread Watrous, Daniel
I'm having some trouble getting my unittests to work when I use Guice to get an instance of the HttpServletRequest object. The page works fine when running in jetty, but in the unittests I get these errors. org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'publ

Re: wicket-guice HttpServletRequest

2013-06-10 Thread Martin Grigorov
Hi, To be able to do this you have to know Guice internals. HttpServletRequest is @Request scoped and since there is no http request in unit/wicketTester tests Guice cannot provide it for you. I guess that you can bind it manually in your TestModule so it will have a global scope as workaround.