Good call and this works perfect for simple UrlBinding. I just ran into
this binding
@UrlBinding("/account/admin/branches/{$event}/{branch.id}")
Guess I am looking for a best practice on how most people unit test their
redirect actions in stripes.
Nathan
On Mon, Dec 14, 2009 at 4:43 PM, Levi Hoogenberg
<[email protected]>wrote:
> Something like SettingsMenuAction.class.getAnnotation
> (UrlBinding.class).value() should do the trick.
>
> Levi
>
> Op 14 dec 2009 om 23:49 heeft Nathan Maves <[email protected]>
> het volgende geschreven:\
>
> > right now I have an action like....
> >
> > @UrlBinding("/settings")
> > public class SettingsMenuAction extends SettingsTabAction {
> > ...
> > }
> >
> > a second action redirects to the action via....
> >
> > public Resolution cancel() {
> > return new RedirectResolution(SettingsMenuAction.class);
> > }
> >
> > now in the unit test of the action that makes the redirect I can run
> > the following fine.
> >
> > @Test
> > public void cancel() throws Exception {
> > trip.execute("cancel");
> >
> > assertEquals("/settings", trip.getDestination());
> > }
> >
> > The only issue I have is with the static "/settings" in the test
> > assertion. Is there anyway to get that binding from the action class?
> >
> > Nathan
> > ---
> > ---
> > ---
> > ---------------------------------------------------------------------
> > Return on Information:
> > Google Enterprise Search pays you back
> > Get the facts.
> > http://p.sf.net/sfu/google-dev2dev
> > _______________________________________________
> > Stripes-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users