[
https://issues.apache.org/jira/browse/WW-3255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lukasz Lenart closed WW-3255.
-----------------------------
Resolution: Not A Problem
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptorTest
> test for multiple SkipValidation methods
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: WW-3255
> URL: https://issues.apache.org/jira/browse/WW-3255
> Project: Struts 2
> Issue Type: Task
> Components: Core Interceptors
> Affects Versions: 2.1.8
> Environment: update
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptorTest
> test for multiple SkipValidation methods
> Reporter: Martin Gainty
> Priority: Minor
> Fix For: 6.1.0
>
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)