Skip to content

Commit

Permalink
Updated tests with corrections to assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrinkster committed Jun 22, 2015
1 parent 66c17bf commit c1e334f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c1e334f

Please sign in to comment.