You need to initialize the ActionContext in your unit tests. Take a look at the Struts 2 tests how it is solved there.
Nils-H On Feb 1, 2008 9:28 AM, Joey Watson <[EMAIL PROTECTED]> wrote: > Hi everybody. > > I want to test a action class (Struts2) by JUnit. and then method in > this action need a value in session, then when I run my JUnit test > class, ActionContext.getContext().getSession return null. (not > ActionContext.getContext().getSession().get("XXX") return null). > this action class is working fine in browser. > > > thanks for any help > > Joey > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]