Commits

Anonymous committed ba2d4c9

Adding test to ensure XW-582 works

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1743e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/test/com/opensymphony/xwork2/validator/AnnotationActionValidatorManagerTest.java

 import com.opensymphony.xwork2.test.SimpleAnnotationAction2;
 import com.opensymphony.xwork2.test.SimpleAnnotationAction3;
 import com.opensymphony.xwork2.test.AnnotationUser;
+import com.opensymphony.xwork2.util.FileManager;
 import com.opensymphony.xwork2.validator.validators.*;
 
 import java.util.List;
         assertEquals(17, validatorList.size());
     }
 
+    public void testGetValidatorsForGivenMethodNameWithoutReloading() throws ValidationException {
+        List validatorList = annotationActionValidatorManager.getValidators(SimpleAnnotationAction.class, alias, "execute");
+
+        //disable configuration reload/devmode
+        FileManager.setReloadingConfigs(false);
+
+        //17 in the class level + 0 in the alias
+        assertEquals(12, validatorList.size());
+        
+        validatorList = annotationActionValidatorManager.getValidators(SimpleAnnotationAction.class, alias, "execute");
+
+        //expect same number of validators
+        assertEquals(12, validatorList.size());
+    }
+    
     public void testDefaultMessageInterpolation() {
         // get validators
         List validatorList = annotationActionValidatorManager.getValidators(AnnotatedTestBean.class, "beanMessageBundle");