1616 */
1717package org .ocpsoft .rewrite .prettyfaces .dynaview ;
1818
19+ import static org .junit .Assert .assertThat ;
20+
1921import org .apache .http .client .methods .HttpGet ;
22+ import org .hamcrest .Matchers ;
2023import org .jboss .arquillian .container .test .api .Deployment ;
2124import org .jboss .arquillian .junit .Arquillian ;
2225import 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