forked from apache/struts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c063704
commit 57106cc
Showing
3 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ public void testDefaultMessageInterpolation() { | |
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 void testMessageInterpolation() { | |
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 void testSkipUserMarkerActionLevelShortCircuit() { | |
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 void testSkipAllActionLevelShortCircuit2() { | |
user.setEmail("[email protected]"); | ||
user.setEmail2("[email protected]"); | ||
|
||
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 void testActionLevelShortCircuit() throws Exception { | |
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 void testShortCircuitNoErrors() { | |
user.setEmail("[email protected]"); | ||
user.setEmail2("[email protected]"); | ||
|
||
ValidatorContext context = new GenericValidatorContext(user, tpf); | ||
ValidatorContext context = new DummyValidatorContext(user, tpf); | ||
annotationActionValidatorManager.validate(user, null, context); | ||
assertFalse(context.hasErrors()); | ||
} catch (ValidationException ex) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters