Hi,

I'm trying to implement JUnit tests for my Stripes actions. But there 
I've a problem.

As described in the Stripes State Management article my ActionBeans use 
a subclass of ActionBeanContext to store application wide data instead 
of accessing the HttpSession directly. The problem is now how to prepare 
the ActionBeanContext with data my actions rely on?
I tried:

        MockServletContext ctx = createMockContext();
        MockRoundtrip trip = new MockRoundtrip(ctx, MyActionBean.class);
        ActionBeanContext actionBeanContext = 
trip.getActionBean(MyActionBean.class).getContext();

But actionBeanContext is null until I call

       trip.execute()

So how can I prefill my context before(!) executing an ActionBean?

Hope somebody can help me here!

Best regards,
Karsten



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to