Search in sources :

Example 46 with Result

use of com.opensymphony.xwork2.Result in project struts by apache.

the class DefaultWorkflowInterceptorTest method testIncludesAndExcludesMethodWithIncludeWildcard.

public void testIncludesAndExcludesMethodWithIncludeWildcard() throws Exception {
    interceptor.setExcludeMethods("input,validate");
    interceptor.setIncludeMethods("*");
    ValidationInterceptor validationInterceptor = create();
    validationInterceptor.setExcludeMethods("input,validate");
    validationInterceptor.setIncludeMethods("*");
    validationInterceptor.intercept(invocation);
    assertEquals(result, interceptor.intercept(invocation));
}
Also used : ValidationInterceptor(com.opensymphony.xwork2.validator.ValidationInterceptor)

Example 47 with Result

use of com.opensymphony.xwork2.Result in project struts by apache.

the class DefaultWorkflowInterceptorTest method testIncludesAndExcludesMethodWithExcludeWildcard.

public void testIncludesAndExcludesMethodWithExcludeWildcard() throws Exception {
    interceptor.setExcludeMethods("*");
    interceptor.setIncludeMethods("execute");
    ValidationInterceptor validationInterceptor = create();
    validationInterceptor.setExcludeMethods("*");
    validationInterceptor.setIncludeMethods("execute");
    validationInterceptor.intercept(invocation);
    assertEquals(result, interceptor.intercept(invocation));
}
Also used : ValidationInterceptor(com.opensymphony.xwork2.validator.ValidationInterceptor)

Example 48 with Result

use of com.opensymphony.xwork2.Result in project struts by apache.

the class DefaultWorkflowInterceptorTest method testIncludesAndExcludesMethodAllWildCarded.

public void testIncludesAndExcludesMethodAllWildCarded() throws Exception {
    interceptor.setExcludeMethods("*");
    interceptor.setIncludeMethods("*");
    ValidationInterceptor validationInterceptor = create();
    validationInterceptor.setExcludeMethods("*");
    validationInterceptor.setIncludeMethods("*");
    validationInterceptor.intercept(invocation);
    assertEquals(result, interceptor.intercept(invocation));
}
Also used : ValidationInterceptor(com.opensymphony.xwork2.validator.ValidationInterceptor)

Example 49 with Result

use of com.opensymphony.xwork2.Result in project struts by apache.

the class DefaultWorkflowInterceptorTest method testIncludesAndExcludesMethodWithIncludeWildcardAndNoMatches.

public void testIncludesAndExcludesMethodWithIncludeWildcardAndNoMatches() throws Exception {
    interceptor.setExcludeMethods("execute,input,validate");
    interceptor.setIncludeMethods("*");
    ValidationInterceptor validationInterceptor = create();
    validationInterceptor.setExcludeMethods("execute,input,validate");
    validationInterceptor.setIncludeMethods("*");
    validationInterceptor.intercept(invocation);
    assertEquals(result, interceptor.intercept(invocation));
}
Also used : ValidationInterceptor(com.opensymphony.xwork2.validator.ValidationInterceptor)

Example 50 with Result

use of com.opensymphony.xwork2.Result in project struts by apache.

the class DefaultWorkflowInterceptorTest method testNoValidateAction.

public void testNoValidateAction() throws Exception {
    ValidationInterceptor validationInterceptor = create();
    validationInterceptor.setExcludeMethods("execute,input,validate");
    validationInterceptor.setIncludeMethods("execute");
    validationInterceptor.intercept(invocation);
    assertEquals(result, interceptor.intercept(invocation));
}
Also used : ValidationInterceptor(com.opensymphony.xwork2.validator.ValidationInterceptor)

Aggregations

ActionSupport (com.opensymphony.xwork2.ActionSupport)63 Test (org.junit.Test)52 ActionProxy (com.opensymphony.xwork2.ActionProxy)51 List (java.util.List)49 ValueStack (com.opensymphony.xwork2.util.ValueStack)38 Result (edu.stanford.CVC4.Result)35 ResultConfig (com.opensymphony.xwork2.config.entities.ResultConfig)34 ActionContext (com.opensymphony.xwork2.ActionContext)33 Expr (edu.stanford.CVC4.Expr)32 SExpr (edu.stanford.CVC4.SExpr)32 CVC4.vectorExpr (edu.stanford.CVC4.vectorExpr)31 ArrayList (java.util.ArrayList)31 ActionInvocation (com.opensymphony.xwork2.ActionInvocation)30 HashMap (java.util.HashMap)29 Rational (edu.stanford.CVC4.Rational)25 ActionConfig (com.opensymphony.xwork2.config.entities.ActionConfig)22 Map (java.util.Map)21 ServletActionContext (org.apache.struts2.ServletActionContext)21 Result (com.opensymphony.xwork2.Result)18 PackageConfig (com.opensymphony.xwork2.config.entities.PackageConfig)18