I just got done digging a little deeper. The constructor
OnwardResolution(Class) was added on March 13, 2006, and has always depended
on an ActionResolver being available. The good news for me is that I didn't
do it :) The bad news for you is that this isn't likely to change anytime
soon so you should go ahead and make sure you have a working configuration
available. Once you get your test fixture set up, working with the Stripes
mock objects is pretty easy. You can look at the source for
StripesTestFixture<http://stripes.svn.sourceforge.net/viewvc/stripes/trunk/tests/src/net/sourceforge/stripes/StripesTestFixture.java?revision=1000&view=markup>to
get you started. Or you can probably just copy and use it directly.

-Ben

On Thu, Dec 18, 2008 at 6:46 PM, Ben Gunter <gunter...@gmail.com> wrote:

> 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

Reply via email to