Hi Erik,
> So after much documentation reading, example following, and head
> banging. I have seem to come to a dead end on trying to make unit tests
> work with stripes. I have one working fine and one not working fine and
> I really can't figure out why the one fails.
The problem is that your test does not correspond to your URL binding.
> Along with the bean:
>
> @UrlBinding("/action/user/{$event}/{userId}")
> public class UserActionBean extends PlActionBean {
> Here is a unit test that doesn't work:
> MockRoundtrip trip = new MockRoundtrip(context,
> UserActionBean.class);
> trip.addParameter("userId", "1");
> trip.execute("view");
Instead, you need:
MockRoundtrip trip = new MockRoundtrip(context, "/action/user/view/1");
trip.execute();
That will correspond to the URL binding of your action bean and the
test will pass.
Cheers,
Freddy
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users