Details
-
Task
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
2.1.8
-
None
-
None
-
update org.apache.struts2.interceptor.validation.AnnotationValidationInterceptorTest test for multiple SkipValidation methods
Description
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