FileDocCategorySizeDatePackage
ActionErrorTagTest.javaAPI DocExample3074Mon Jul 23 13:26:16 BST 2007org.apache.struts2.views.jsp.ui

ActionErrorTagTest

public class ActionErrorTagTest extends org.apache.struts2.views.jsp.AbstractUITagTest
ActionErrorTag test case.

Fields Summary
boolean
shouldActionHaveError
Constructors Summary
Methods Summary
public com.opensymphony.xwork2.ActiongetAction()

        return new InternalActionSupport();
    
public voidtestHaveActionErrors()


        ActionErrorTag tag = new ActionErrorTag();
        ((InternalActionSupport)action).setHasActionErrors(true);
        tag.setPageContext(pageContext);
        tag.doStartTag();
        tag.doEndTag();

        verify(ActionErrorTagTest.class.getResource("actionerror-2.txt"));
    
public voidtestNoActionErrors()


         
        ActionErrorTag tag = new ActionErrorTag();
        ((InternalActionSupport)action).setHasActionErrors(false);
        tag.setPageContext(pageContext);
        tag.doStartTag();
        tag.doEndTag();

        //assertEquals("", writer.toString());
        verify(ActionErrorTagTest.class.getResource("actionerror-1.txt"));