org.apache.struts2.interceptor.validation.AnnotationValidationInterceptorTest test for multiple
SkipValidation methods
----------------------------------------------------------------------------------------------------------------------
Key: WW-3255
URL: https://issues.apache.org/struts/browse/WW-3255
Project: Struts 2
Issue Type: Task
Components: Core Interceptors
Affects Versions: 2.1.7
Environment: update org.apache.struts2.interceptor.validation.AnnotationValidationInterceptorTest
test for multiple SkipValidation methods
Reporter: Martin Gainty
Priority: Minor
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptorTest
currently does not have a way to test SkipValidation on more than 1method per class
i propose a prlim testMultipleSkip method ..change at will
public void testMultipleSkip() throws Exception
{
//test the first class for SkipValidation
mockActionProxy.expectAndReturn("getMethod", "skipMe");
interceptor.doIntercept((ActionInvocation)mockActionInvocation.proxy());
mockActionProxy.verify();
//test the base method (of first class) should be skipped
mockActionProxy.expectAndReturn("getMethod", "skipMeBase");
interceptor.doIntercept((ActionInvocation)mockActionInvocation.proxy());
mockActionProxy.verify();
//test the 2nd SkipValidation method to be skipped
mockActionProxy.expectAndReturn("getMethod", "skipMe2");
interceptor.doIntercept((ActionInvocation)mockActionInvocation.proxy());
mockActionProxy.verify();
//test the 2nd method (Base) should be skipped
mockActionProxy.expectAndReturn("getMethod", "skipMeBase2");
interceptor.doIntercept((ActionInvocation)mockActionInvocation.proxy());
mockActionProxy.verify();
}
Martin
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|