use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class ValidationErrorAwareTest method testNotChangeResultWhenNotifyAboutValidationError.
public void testNotChangeResultWhenNotifyAboutValidationError() throws Exception {
// given
actionResult = Action.INPUT;
ValidationInterceptor validationInterceptor = create();
// when
validationInterceptor.intercept(invocation);
// then
Assert.assertEquals(Action.INPUT, interceptor.intercept(invocation));
}
use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class ValidationErrorAwareTest method testChangeResultWhenNotifyAboutValidationErrors.
public void testChangeResultWhenNotifyAboutValidationErrors() throws Exception {
// given
ValidationInterceptor validationInterceptor = create();
// when
validationInterceptor.intercept(invocation);
// then
assertEquals(actionResult, interceptor.intercept(invocation));
}
use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class ValidationInterceptorPrefixMethodInvocationTest method testPrefixMethodInvocation1.
public void testPrefixMethodInvocation1() throws Exception {
method = "save";
result = Action.INPUT;
ValidationInterceptor interceptor = create();
String result = interceptor.intercept(invocation);
assertEquals(Action.INPUT, result);
}
use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class DefaultWorkflowInterceptorTest method testInvokesActionInvocationIfNoErrors.
public void testInvokesActionInvocationIfNoErrors() throws Exception {
ValidationInterceptor validationInterceptor = create();
validationInterceptor.intercept(invocation);
assertEquals(result, interceptor.intercept(invocation));
}
use of com.opensymphony.xwork2.validator.ValidationInterceptor in project struts by apache.
the class DefaultWorkflowInterceptorTest method testExcludesMethod.
public void testExcludesMethod() throws Exception {
interceptor.setExcludeMethods("execute");
ValidationInterceptor validationInterceptor = create();
validationInterceptor.setExcludeMethods("execute");
interceptor.setExcludeMethods("execute");
validationInterceptor.intercept(invocation);
assertEquals(result, interceptor.intercept(invocation));
}
Aggregations