I was looking into this last night. I read the unit testing information on
the Stripes web site, and it does say you should be able to just create your
ActionBeans and test them without using any mock objects. Between 1.4 and
1.5 some new features were added that introduced dependencies on the
configuration into some classes that had previously not depended on it. I'm
not sure if it will be possible in the future to test your ActionBeans this
way, but I will look into it further. In the meantime, you should look into
making a Configuration object available via StripesFilter. This might mean
you have to use the mock objects for now. Take a look at the unit testing
docs <http://www.stripesframework.org/display/stripes/Unit+Testing> on the
Stripes site for more information on how to do that.
-Ben
On Thu, Dec 18, 2008 at 12:09 PM, Asleson, Ryan <asle...@biworldwide.com>wrote:
>
> In my unit tests I'm creating my ActionBeans simply by using the "new"
> operator:
>
> MyActionBean actionBean = new MyActionBean();
>
> Should they be created another way?
>
> -----Original Message-----
> From: Mike McNally [mailto:emmecin...@gmail.com]
> Sent: Thursday, December 18, 2008 9:51 AM
> To: Stripes Users List
> Subject: Re: [Stripes-users] RedirectResolution in Unit Tests
>
> On Thu, Dec 18, 2008 at 9:28 AM, Asleson, Ryan <asle...@biworldwide.com>
> wrote:
> >
> > Does anybody have any insight on this?
>
> How are you launching your action beans in your unit tests?
> Specifically, is it through the Stripes "Mock" facilities?
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
> ------------------------------------------------------------------------
> ------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
> Nevada.
> The future of the web can't happen without you. Join us at MIX09 to
> help pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.
> com/<http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/>
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
> This e-mail message is being sent solely for use by the intended
> recipient(s) and may contain confidential information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not the
> intended recipient, please contact the sender by phone or reply by e-mail,
> delete the original message and destroy all copies. Thank you.
>
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
>
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users