use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class DefaultWorkflowInterceptorTest method testIncludesMethod.
public void testIncludesMethod() throws Exception {
interceptor.setIncludeMethods("execute");
ValidationInterceptor validationInterceptor = create();
validationInterceptor.setIncludeMethods("execute");
validationInterceptor.intercept(invocation);
assertEquals(result, interceptor.intercept(invocation));
}
use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class DefaultWorkflowInterceptorTest method testIncludesAndExcludesMethod.
public void testIncludesAndExcludesMethod() throws Exception {
interceptor.setExcludeMethods("execute,input,validate");
interceptor.setIncludeMethods("execute");
ValidationInterceptor validationInterceptor = create();
validationInterceptor.setExcludeMethods("execute,input,validate");
validationInterceptor.setIncludeMethods("execute");
validationInterceptor.intercept(invocation);
assertEquals(result, interceptor.intercept(invocation));
}
use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class DefaultWorkflowInterceptorTest method testIncludesMethodWithWildcard.
public void testIncludesMethodWithWildcard() throws Exception {
interceptor.setIncludeMethods("*");
ValidationInterceptor validationInterceptor = create();
validationInterceptor.setIncludeMethods("*");
validationInterceptor.intercept(invocation);
assertEquals(result, interceptor.intercept(invocation));
}
use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class DefaultWorkflowInterceptorTest method testExcludesMethodWithWildCard.
public void testExcludesMethodWithWildCard() throws Exception {
interceptor.setExcludeMethods("*");
ValidationInterceptor validationInterceptor = create();
validationInterceptor.intercept(invocation);
validationInterceptor.setExcludeMethods("*");
assertEquals(result, interceptor.intercept(invocation));
}
use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class DefaultWorkflowInterceptorTest method testReturnsInputWithoutExecutingIfHasErrors.
public void testReturnsInputWithoutExecutingIfHasErrors() throws Exception {
result = Action.INPUT;
ValidationInterceptor validationInterceptor = create();
validationInterceptor.intercept(invocation);
assertEquals(Action.INPUT, interceptor.intercept(invocation));
}
Aggregations