Hi,
We have a typical superclass for our ActionBeans:
public abstract class BaseActionBean implements ActionBean {
...
protected MyActionBeanContext context;
public final MyActionBeanContext getContext() { return context; }
public final void setContext(ActionBeanContext context) {
Partially solved... obvious that if MyActionBeanContext interacts with
session then one can set directly on MockHttpSession e.g.
request.getSession().setAttribute(MyActionBeanContext.SESSION_USER, user);
However, still curious on how to replace MyActionBeanContext with a test
o
I'm using something like this to set up Stripes (JUnit 4, then use standard
MockRoundtrip()). You should be able to replace the ActionBeanContext here
with whatever you like.
@BeforeClass
public static void mockUp()
{
MockServletContext context = new MockServletContext("test"