[Stripes-users] MockRoundTrip:: ActionBean Testing UrlBinding and ActionBeanContext

2011-01-24 Thread Nikolaos Giannopoulos
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) {

Re: [Stripes-users] MockRoundTrip:: ActionBean Testing UrlBinding and ActionBeanContext

2011-01-24 Thread Nikolaos Giannopoulos
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

Re: [Stripes-users] MockRoundTrip:: ActionBean Testing UrlBinding and ActionBeanContext

2011-01-24 Thread Janne Jalkanen
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"