Skip to content

Commit e867cb0

Browse files
committed
AmbiguousViewidTest cleanup
1 parent a1084d7 commit e867cb0

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

‎config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/dynaview/AmbiguousViewidTest.java‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
*/
1717
package org.ocpsoft.rewrite.prettyfaces.dynaview;
1818

19+
import static org.junit.Assert.assertThat;
20+
1921
import org.apache.http.client.methods.HttpGet;
22+
import org.hamcrest.Matchers;
2023
import org.jboss.arquillian.container.test.api.Deployment;
2124
import org.jboss.arquillian.junit.Arquillian;
2225
import org.jboss.shrinkwrap.api.spec.WebArchive;
@@ -45,11 +48,11 @@ public void testLinkGenerationSelectsCorrectMapping() throws Exception
4548
HttpAction<HttpGet> action = get("/foo");
4649

4750
Assert.assertEquals(200, action.getStatusCode());
48-
Assert.assertTrue(action.getResponseContent().contains("action=\"" + action.getContextPath() + "/foo\""));
51+
assertThat(action.getResponseContent(), Matchers.containsString("action=\"" + action.getContextPath() + "/foo\""));
4952

50-
Assert.assertTrue(action.getResponseContent().contains("href=\"" + action.getContextPath() + "/foo\""));
51-
Assert.assertTrue(action.getResponseContent().contains("href=\"" + action.getContextPath() + "/bar\""));
52-
Assert.assertTrue(action.getResponseContent().contains("href=\"" + action.getContextPath() + "/baz\""));
53+
assertThat(action.getResponseContent(), Matchers.containsString("href=\"" + action.getContextPath() + "/foo\""));
54+
assertThat(action.getResponseContent(), Matchers.containsString("href=\"" + action.getContextPath() + "/bar\""));
55+
assertThat(action.getResponseContent(), Matchers.containsString("href=\"" + action.getContextPath() + "/baz\""));
5356
}
5457

5558
@Test
@@ -58,10 +61,10 @@ public void testRendersCorrectURLForDynaview() throws Exception
5861
HttpAction<HttpGet> action = get("/baz");
5962

6063
Assert.assertEquals(200, action.getStatusCode());
61-
Assert.assertTrue(action.getResponseContent().contains("action=\"" + action.getContextPath() + "/baz\""));
64+
assertThat(action.getResponseContent(), Matchers.containsString("action=\"" + action.getContextPath() + "/baz\""));
6265

63-
Assert.assertTrue(action.getResponseContent().contains("href=\"" + action.getContextPath() + "/foo\""));
64-
Assert.assertTrue(action.getResponseContent().contains("href=\"" + action.getContextPath() + "/bar\""));
65-
Assert.assertTrue(action.getResponseContent().contains("href=\"" + action.getContextPath() + "/baz\""));
66+
assertThat(action.getResponseContent(), Matchers.containsString("href=\"" + action.getContextPath() + "/foo\""));
67+
assertThat(action.getResponseContent(), Matchers.containsString("href=\"" + action.getContextPath() + "/bar\""));
68+
assertThat(action.getResponseContent(), Matchers.containsString("href=\"" + action.getContextPath() + "/baz\""));
6669
}
6770
}

0 commit comments

Comments
 (0)