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.

Reply via email to