Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E9B42200C28 for ; Mon, 13 Mar 2017 18:46:15 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E84F5160B90; Mon, 13 Mar 2017 17:46:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1BF87160B5D for ; Mon, 13 Mar 2017 18:46:14 +0100 (CET) Received: (qmail 20149 invoked by uid 500); 13 Mar 2017 17:46:12 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 19711 invoked by uid 99); 13 Mar 2017 17:46:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2017 17:46:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8CE4AF3210; Mon, 13 Mar 2017 17:46:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lukaszlenart@apache.org To: commits@struts.apache.org Date: Mon, 13 Mar 2017 17:46:18 -0000 Message-Id: <178b38a18e6c456da1452d6f0dc49006@git.apache.org> In-Reply-To: <677fbd2a69c24ddea1db36c5278037d8@git.apache.org> References: <677fbd2a69c24ddea1db36c5278037d8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [09/17] struts git commit: Renames class to match its purpose archived-at: Mon, 13 Mar 2017 17:46:16 -0000 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 Authored: Fri Mar 10 09:21:28 2017 +0100 Committer: Lukasz Lenart 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());