Pat Lightbody wrote: > Indexed properties is supposed, XDoclet could be added but the > configuration is already damn easy without requiring XDoclet. Cactus > integration is trivial, but why not just mock it all?
I completely agree. WebWork doesn't require you to use something like StrutsTestCase and/or Cactus because it's not as strongly tied to the web. Here's a short example that tests a fictious /member/login.action
---- snip ----
Map parameters; Map extraContext;
public void setUp() {
parameters = new HashMap();
extraContext = new HashMap();
extraContext.put(ActionContext.PARAMETERS, parameters);
}public void testSuccessfulLogin() throws Exception {
parameters.put("username", new String[]{"savaki"});
parameters.put("password", new String[]{"password"});
ActionProxy proxy = ActionProxyFactory.getFactory().
createActionProxy("/member", "login", extraContext, false);
String result = proxy.execute();
assertEquals(Action.SUCCESS, result);LoginAction action = (LoginAction)proxy.geAction(); // do more assertions here }
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
