Skip to content

Commit c1e334f

Browse files
committed
Updated tests with corrections to assertions
1 parent 66c17bf commit c1e334f

File tree

1 file changed

+6
-6
lines changed
  • jsf/bean-validation/src/test/java/org/javaee7/jsf/bean/validation

1 file changed

+6
-6
lines changed

jsf/bean-validation/src/test/java/org/javaee7/jsf/bean/validation/MyBeanTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void testNameLessCharacters() throws IOException {
6868
zipInputText.setText("12345");
6969
HtmlPage result = button.click();
7070
HtmlSpan span = (HtmlSpan) result.getElementById("nameMessage");
71-
assertEquals("At least 3 characters", span.asText());
71+
assertEquals("nameInputText: At least 3 characters", span.asText());
7272
}
7373

7474
@Test
@@ -88,7 +88,7 @@ public void testAgeLessThan() throws IOException {
8888
zipInputText.setText("12345");
8989
HtmlPage result = button.click();
9090
HtmlSpan span = (HtmlSpan) result.getElementById("ageMessage");
91-
assertEquals("must be greater than or equal to 18", span.asText());
91+
assertEquals("ageInputText: must be greater than or equal to 18", span.asText());
9292
}
9393

9494
@Test
@@ -118,7 +118,7 @@ public void testAgeGreaterThan() throws IOException {
118118
zipInputText.setText("12345");
119119
HtmlPage result = button.click();
120120
HtmlSpan span = (HtmlSpan) result.getElementById("ageMessage");
121-
assertEquals("must be less than or equal to 25", span.asText());
121+
assertEquals("ageInputText: must be less than or equal to 25", span.asText());
122122
}
123123

124124
@Test
@@ -128,7 +128,7 @@ public void testZipAlphabets() throws IOException {
128128
zipInputText.setText("abcde");
129129
HtmlPage result = button.click();
130130
HtmlSpan span = (HtmlSpan) result.getElementById("zipMessage");
131-
assertEquals("must match \"[0-9]{5}\"", span.asText());
131+
assertEquals("zipInputText: must match the following regular expression: [0-9]{5}", span.asText());
132132
}
133133

134134
@Test
@@ -138,7 +138,7 @@ public void testZipLessNumbers() throws IOException {
138138
zipInputText.setText("1234");
139139
HtmlPage result = button.click();
140140
HtmlSpan span = (HtmlSpan) result.getElementById("zipMessage");
141-
assertEquals("must match \"[0-9]{5}\"", span.asText());
141+
assertEquals("zipInputText: must match the following regular expression: [0-9]{5}", span.asText());
142142
}
143143

144144
@Test
@@ -148,7 +148,7 @@ public void testZipMoreNumbers() throws IOException {
148148
zipInputText.setText("123456");
149149
HtmlPage result = button.click();
150150
HtmlSpan span = (HtmlSpan) result.getElementById("zipMessage");
151-
assertEquals("must match \"[0-9]{5}\"", span.asText());
151+
assertEquals("zipInputText: must match the following regular expression: [0-9]{5}", span.asText());
152152
}
153153

154154
@Test

0 commit comments

Comments
 (0)