struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [09/17] struts git commit: Renames class to match its purpose
Date Mon, 13 Mar 2017 17:46:18 GMT
Renames class to match its purpose


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/57106ccd
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/57106ccd
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/57106ccd

Branch: refs/heads/master
Commit: 57106ccda2207edb52e575e16cfd47599e9c7110
Parents: c063704
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Mar 10 09:21:28 2017 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Mar 10 09:21:28 2017 +0100

----------------------------------------------------------------------
 .../validator/AnnotationActionValidatorManagerTest.java | 12 ++++++------
 .../xwork2/validator/RegexFieldValidatorTest.java       | 12 ++++++------
 .../opensymphony/xwork2/validator/URLValidatorTest.java | 10 +++++-----
 3 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/57106ccd/core/src/test/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManagerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManagerTest.java
b/core/src/test/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManagerTest.java
index 10936f8..89c21e3 100644
--- a/core/src/test/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManagerTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManagerTest.java
@@ -128,7 +128,7 @@ public class AnnotationActionValidatorManagerTest extends XWorkTestCase
{
             bean.setName("foo");
             bean.setCount(99);
 
-            ValidatorContext context = new GenericValidatorContext(bean, tpf);
+            ValidatorContext context = new DummyValidatorContext(bean, tpf);
             annotationActionValidatorManager.validate(bean, "beanMessageBundle", context);
             assertTrue(context.hasErrors());
             assertTrue(context.hasFieldErrors());
@@ -256,7 +256,7 @@ public class AnnotationActionValidatorManagerTest extends XWorkTestCase
{
             bean.setName("foo");
             bean.setCount(150);
 
-            ValidatorContext context = new GenericValidatorContext(bean, tpf);
+            ValidatorContext context = new DummyValidatorContext(bean, tpf);
             annotationActionValidatorManager.validate(bean, "beanMessageBundle", context);
             assertTrue(context.hasErrors());
             assertTrue(context.hasFieldErrors());
@@ -294,7 +294,7 @@ public class AnnotationActionValidatorManagerTest extends XWorkTestCase
{
             user.setEmail("bad_email");
             user.setEmail2("bad_email");
 
-            ValidatorContext context = new GenericValidatorContext(user, tpf);
+            ValidatorContext context = new DummyValidatorContext(user, tpf);
             annotationActionValidatorManager.validate(user, null, context);
             assertTrue(context.hasFieldErrors());
 
@@ -336,7 +336,7 @@ public class AnnotationActionValidatorManagerTest extends XWorkTestCase
{
             user.setEmail("mark_bad_email_for_field_val@foo.com");
             user.setEmail2("mark_bad_email_for_field_val@foo.com");
 
-            ValidatorContext context = new GenericValidatorContext(user, tpf);
+            ValidatorContext context = new DummyValidatorContext(user, tpf);
             annotationActionValidatorManager.validate(user, null, context);
             assertTrue(context.hasFieldErrors());
 
@@ -374,7 +374,7 @@ public class AnnotationActionValidatorManagerTest extends XWorkTestCase
{
         user.setEmail("rainer_h(at)example.com");
 
 
-        ValidatorContext context = new GenericValidatorContext(user, tpf);
+        ValidatorContext context = new DummyValidatorContext(user, tpf);
         annotationActionValidatorManager.validate(user, null, context);
     	
     	// check field level errors
@@ -405,7 +405,7 @@ public class AnnotationActionValidatorManagerTest extends XWorkTestCase
{
             user.setEmail("mark@mycompany.com");
             user.setEmail2("mark@mycompany.com");
 
-            ValidatorContext context = new GenericValidatorContext(user, tpf);
+            ValidatorContext context = new DummyValidatorContext(user, tpf);
             annotationActionValidatorManager.validate(user, null, context);
             assertFalse(context.hasErrors());
         } catch (ValidationException ex) {

http://git-wip-us.apache.org/repos/asf/struts/blob/57106ccd/core/src/test/java/com/opensymphony/xwork2/validator/RegexFieldValidatorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/RegexFieldValidatorTest.java
b/core/src/test/java/com/opensymphony/xwork2/validator/RegexFieldValidatorTest.java
index bbb9588..5c7e94b 100644
--- a/core/src/test/java/com/opensymphony/xwork2/validator/RegexFieldValidatorTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/validator/RegexFieldValidatorTest.java
@@ -53,7 +53,7 @@ public class RegexFieldValidatorTest extends XWorkTestCase {
 
         RegexFieldValidator validator = new RegexFieldValidator();
         validator.setRegex("^Sec.*");
-        validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+        validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
         validator.setFieldName("username");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(testPerson);
@@ -74,7 +74,7 @@ public class RegexFieldValidatorTest extends XWorkTestCase {
         RegexFieldValidator validator = new RegexFieldValidator();
         validator.setTrim(false);
         validator.setRegex("^Sec.*\\s");
-        validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+        validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
         validator.setFieldName("username");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(testPerson);
@@ -94,7 +94,7 @@ public class RegexFieldValidatorTest extends XWorkTestCase {
 
         RegexFieldValidator validator = new RegexFieldValidator();
         validator.setRegex("^Sec.*");
-        validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+        validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
         validator.setFieldName("username");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(testPerson);
@@ -119,7 +119,7 @@ public class RegexFieldValidatorTest extends XWorkTestCase {
 
         RegexFieldValidator validator = new RegexFieldValidator();
         validator.setRegex("^Sec.*");
-        validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+        validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
         validator.setFieldName(null);
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(testPerson);
@@ -152,7 +152,7 @@ public class RegexFieldValidatorTest extends XWorkTestCase {
 
         RegexFieldValidator validator = new RegexFieldValidator();
         validator.setRegex("^Sec.*");
-        validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+        validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
         validator.setFieldName("username");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(testPerson);
@@ -172,7 +172,7 @@ public class RegexFieldValidatorTest extends XWorkTestCase {
 
         RegexFieldValidator validator = new RegexFieldValidator();
         validator.setRegex("[0-9][0-9]");
-        validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+        validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
         validator.setFieldName("age");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(testPerson);

http://git-wip-us.apache.org/repos/asf/struts/blob/57106ccd/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java b/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
index 9f995d8..ff9ab50 100644
--- a/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
@@ -42,7 +42,7 @@ public class URLValidatorTest extends XWorkTestCase {
 	public void testAcceptNullValueForMutualExclusionOfValidators() throws Exception {
 		
 		URLValidator validator = new URLValidator();
-		validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+		validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
 		validator.setFieldName("testingUrl1");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(new MyObject());
@@ -56,7 +56,7 @@ public class URLValidatorTest extends XWorkTestCase {
 	public void testInvalidEmptyValue() throws Exception {
 		
 		URLValidator validator = new URLValidator();
-		validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+		validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
 		validator.setFieldName("testingUrl2");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(new MyObject());
@@ -70,7 +70,7 @@ public class URLValidatorTest extends XWorkTestCase {
 	public void testInvalidValue() throws Exception {
 		
 		URLValidator validator = new URLValidator();
-		validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+		validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
 		validator.setFieldName("testingUrl3");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(new MyObject());
@@ -85,7 +85,7 @@ public class URLValidatorTest extends XWorkTestCase {
 	public void testValidUrl1() throws Exception {
 		
 		URLValidator validator = new URLValidator();
-		validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+		validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
 		validator.setFieldName("testingUrl4");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(new MyObject());
@@ -99,7 +99,7 @@ public class URLValidatorTest extends XWorkTestCase {
 	public void testValidUrl2() throws Exception {
 		
 		URLValidator validator = new URLValidator();
-		validator.setValidatorContext(new GenericValidatorContext(new Object(), tpf));
+		validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
 		validator.setFieldName("testingUrl5");
         validator.setValueStack(ActionContext.getContext().getValueStack());
         validator.validate(new MyObject());


Mime
View raw message