private void setResult(ActionForward currentForward) { if (null == currentForward) { forward = null; } else { forward = new MockActionForward(currentForward); } }
public MockActionForward(String name, String path, boolean redirect, String module) { super(); setName(name); setPath(path); setRedirect(redirect); setModule(module); }
public MockActionForward(String name, boolean redirect) { super(); setName(name); setPath(null); setRedirect(redirect); }
public MockActionForward(String name, String path, boolean redirect, boolean contextRelative) { super(); setName(name); setPath(path); setRedirect(redirect); setContextRelative(contextRelative); }
/** * Verifies the redirect attribute. * @param redirect the expected redirect attribute * @throws VerifyFailedException if verification fails */ public void verifyRedirect(boolean redirect) { if(null == getActionForward()) { throw new VerifyFailedException("ActionForward == null"); } else if(!getActionForward().verifyRedirect(redirect)) { throw new VerifyFailedException("expected " + redirect + ", received " + getActionForward().getRedirect()); } }
/** * Verifies the forward name returned by the action. * If your action uses <code>mapping.findForward("success")</code> * to find the forward, you can use this method or * {@link #verifyForward} to test the <code>success</code> forward * name. If your action creates an <code>ActionForward</code> on its * own you can use this method to verify the forward <code>name</code>. * @param name the expected name * @throws VerifyFailedException if verification fails */ public void verifyForwardName(String name) { if(null == getActionForward()) { throw new VerifyFailedException("ActionForward == null"); } else if (!getActionForward().verifyName(name)) { throw new VerifyFailedException("expected " + name + ", received " + getActionForward().getName()); } }
/** * Verifies the forward path returned by the action. * If your action uses <code>mapping.findForward("success")</code> * to find the forward, you can use this method or * {@link #verifyForwardName} to test the <code>success</code> forward * name. If your action creates an <code>ActionForward</code> on its * own you can use this method to verify the forward <code>path</code>. * @param path the expected path * @throws VerifyFailedException if verification fails */ public void verifyForward(String path) { if(null == getActionForward()) { throw new VerifyFailedException("ActionForward == null"); } else if (!getActionForward().verifyPath(path)) { throw new VerifyFailedException("expected " + path + ", received " + getActionForward().getPath()); } }
public boolean verifyRedirect(boolean redirect) { return getRedirect() == redirect; } }
public MockActionForward(String name, String path, boolean redirect, boolean contextRelative) { super(); setName(name); setPath(path); setRedirect(redirect); setContextRelative(contextRelative); }
public MockActionForward(String name, String path, boolean redirect) { super(); setName(name); setPath(path); setRedirect(redirect); }
public MockActionForward(String name, String path, boolean redirect, String module) { super(); setName(name); setPath(path); setRedirect(redirect); setModule(module); }
/** * Verifies the redirect attribute. * @param redirect the expected redirect attribute * @throws VerifyFailedException if verification fails */ public void verifyRedirect(boolean redirect) { if(null == getActionForward()) { throw new VerifyFailedException("ActionForward == null"); } else if(!getActionForward().verifyRedirect(redirect)) { throw new VerifyFailedException("expected " + redirect + ", received " + getActionForward().getRedirect()); } }
/** * Verifies the forward name returned by the action. * If your action uses <code>mapping.findForward("success")</code> * to find the forward, you can use this method or * {@link #verifyForward} to test the <code>success</code> forward * name. If your action creates an <code>ActionForward</code> on its * own you can use this method to verify the forward <code>name</code>. * @param name the expected name * @throws VerifyFailedException if verification fails */ public void verifyForwardName(String name) { if(null == getActionForward()) { throw new VerifyFailedException("ActionForward == null"); } else if (!getActionForward().verifyName(name)) { throw new VerifyFailedException("expected " + name + ", received " + getActionForward().getName()); } }
/** * Verifies the forward path returned by the action. * If your action uses <code>mapping.findForward("success")</code> * to find the forward, you can use this method or * {@link #verifyForwardName} to test the <code>success</code> forward * name. If your action creates an <code>ActionForward</code> on its * own you can use this method to verify the forward <code>path</code>. * @param path the expected path * @throws VerifyFailedException if verification fails */ public void verifyForward(String path) { if(null == getActionForward()) { throw new VerifyFailedException("ActionForward == null"); } else if (!getActionForward().verifyPath(path)) { throw new VerifyFailedException("expected " + path + ", received " + getActionForward().getPath()); } }
public boolean verifyRedirect(boolean redirect) { return getRedirect() == redirect; } }
public MockActionForward(String name, String path, boolean redirect, boolean contextRelative) { super(); setName(name); setPath(path); setRedirect(redirect); setContextRelative(contextRelative); }
public MockActionForward(String name, boolean redirect) { super(); setName(name); setPath(null); setRedirect(redirect); }
public MockActionForward(String name, String path, boolean redirect, String module) { super(); setName(name); setPath(path); setRedirect(redirect); setModule(module); }