From c1e334fa4f89d35f28497671f45753249bc3d2d0 Mon Sep 17 00:00:00 2001 From: rbrinkster Date: Mon, 22 Jun 2015 17:05:46 -0500 Subject: [PATCH] Updated tests with corrections to assertions --- .../org/javaee7/jsf/bean/validation/MyBeanTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jsf/bean-validation/src/test/java/org/javaee7/jsf/bean/validation/MyBeanTest.java b/jsf/bean-validation/src/test/java/org/javaee7/jsf/bean/validation/MyBeanTest.java index 64135dd5d..d50b3b688 100644 --- a/jsf/bean-validation/src/test/java/org/javaee7/jsf/bean/validation/MyBeanTest.java +++ b/jsf/bean-validation/src/test/java/org/javaee7/jsf/bean/validation/MyBeanTest.java @@ -68,7 +68,7 @@ public void testNameLessCharacters() throws IOException { zipInputText.setText("12345"); HtmlPage result = button.click(); HtmlSpan span = (HtmlSpan) result.getElementById("nameMessage"); - assertEquals("At least 3 characters", span.asText()); + assertEquals("nameInputText: At least 3 characters", span.asText()); } @Test @@ -88,7 +88,7 @@ public void testAgeLessThan() throws IOException { zipInputText.setText("12345"); HtmlPage result = button.click(); HtmlSpan span = (HtmlSpan) result.getElementById("ageMessage"); - assertEquals("must be greater than or equal to 18", span.asText()); + assertEquals("ageInputText: must be greater than or equal to 18", span.asText()); } @Test @@ -118,7 +118,7 @@ public void testAgeGreaterThan() throws IOException { zipInputText.setText("12345"); HtmlPage result = button.click(); HtmlSpan span = (HtmlSpan) result.getElementById("ageMessage"); - assertEquals("must be less than or equal to 25", span.asText()); + assertEquals("ageInputText: must be less than or equal to 25", span.asText()); } @Test @@ -128,7 +128,7 @@ public void testZipAlphabets() throws IOException { zipInputText.setText("abcde"); HtmlPage result = button.click(); HtmlSpan span = (HtmlSpan) result.getElementById("zipMessage"); - assertEquals("must match \"[0-9]{5}\"", span.asText()); + assertEquals("zipInputText: must match the following regular expression: [0-9]{5}", span.asText()); } @Test @@ -138,7 +138,7 @@ public void testZipLessNumbers() throws IOException { zipInputText.setText("1234"); HtmlPage result = button.click(); HtmlSpan span = (HtmlSpan) result.getElementById("zipMessage"); - assertEquals("must match \"[0-9]{5}\"", span.asText()); + assertEquals("zipInputText: must match the following regular expression: [0-9]{5}", span.asText()); } @Test @@ -148,7 +148,7 @@ public void testZipMoreNumbers() throws IOException { zipInputText.setText("123456"); HtmlPage result = button.click(); HtmlSpan span = (HtmlSpan) result.getElementById("zipMessage"); - assertEquals("must match \"[0-9]{5}\"", span.asText()); + assertEquals("zipInputText: must match the following regular expression: [0-9]{5}", span.asText()); } @Test