Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3255

org.apache.struts2.interceptor.validation.AnnotationValidationInterceptorTest test for multiple SkipValidation methods

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.8
    • Fix Version/s: Future
    • Component/s: Core Interceptors
    • Labels:
      None
    • Environment:

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mgainty Martin Gainty
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: