You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Loritsch, Berin C." <Be...@gd-ais.com> on 2009/12/08 17:23:22 UTC
Wicket Test Harness and HTTP objects
I discovered as I implemented the SessionListener to clean up user
record locks that the WicketTester object does not behave as expected in
regards to the HttpSession objects. I expected to have my
MockHttpSession already configured with the application session object
bound in the specified location. In otherwords I would expect the
following to work:
MySession session = MySession.get();
HttpSession htSession = tester.getHttpSession();
assertEquals(session, htSession.get("wicket:myapp.context:" +
Session.SESSION_ATTRIBUTE_NAME))
This is a true condition with a deployed application, however the
mapping has to be done manually by my testcase. Is this by design or is
this a bug? The mock objects should provide enough imitation of reality
to allow testing integration points like this a bit easier.