On Yesterday at 9:16pm, DC=>Dimitrios Christodoulakis <dimi....@gmail.com>...:

DC> [..snip..]
DC> 
DC> When testing (junit 4) an action implementing the Sessionaware 
DC> interface (my login and register classes) I noticed that the session 
DC> object is set to null by BaseStrutsTestCase. This was mentioned before 
DC> in the author's blog, but not sure if ever addressed. I added a new 
DC> comment over there but the discussion could be inactive.
DC> 

Hi Dimitrios,

Don't think arsenalist is watching that blog dilligently any more.

DC> 
DC> I was wondering if anyone who is using the BaseStrutsTestCase, or used 
DC> it in the past, came across this issue and if by any chance managed to 
DC> resolve it. Perhaps Haroon might have a comment on this?
DC> 

Not a whole lot at the moment as none of our Action classes implement 
those interfaces. How about something like:

protected static HashMap sessionMap = new HashMap();

//.... and further on later in the code

proxy.getInvocation().getInvocationContext().setSession(sessionMap);


DC> 
DC> Also, a couple of more general questions:
DC> 
DC> 1) Is there a recommended way to check during testing which 
DC>    interceptors are firing and when?
DC> 

Careful there. Haven't you now delved into the territory of testing the 
framework itself (rather than your own code)? IMHO, I would assume that 
it's the framework's responsibility to make sure that when a certain set 
of interceptors is configured, they better fire properly.

DC> 
DC> [..snip..]
DC> 
DC> Kind regards and I appreciate all the input.
DC> 

Cheers,
--
Haroon Rafique
<haroon.rafi...@utoronto.ca>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to