Uses more direct message to link with proper resource bundle

This commit is contained in:
Lukasz Lenart
2017-03-13 06:45:37 +01:00
parent 55ea82cd4f
commit 2b3082ee40
2 changed files with 4 additions and 5 deletions
@@ -35,11 +35,10 @@ public class VisitorFieldValidatorTest extends XWorkTestCase {
public void setUp() throws Exception {
super.setUp();
action = new VisitorValidatorTestAction();
container.inject(action);
action = container.inject(VisitorValidatorTestAction.class);
TestBean bean = action.getBean();
Calendar cal = new GregorianCalendar(1900, 01, 01);
Calendar cal = new GregorianCalendar(1900, 1, 1);
bean.setBirth(cal.getTime());
bean.setCount(-1);
@@ -98,7 +97,7 @@ public class VisitorFieldValidatorTest extends XWorkTestCase {
assertEquals(1, beanCountMessages.size());
String beanCountMessage = beanCountMessages.get(0);
assertEquals("bean: Model: Count must be between 1 and 100, current value is -1.", beanCountMessage);
assertEquals("bean: TestBean model: Count must be between 1 and 100, current value is -1.", beanCountMessage);
}
public void testCollectionValidation() throws Exception {
@@ -1 +1 @@
invalid.count=Model: Count must be between ${min} and ${max}, current value is ${count}.
invalid.count=TestBean model: Count must be between ${min} and ${max}, current value is ${count}.