File tree Expand file tree Collapse file tree 3 files changed +9
-21
lines changed
Expand file tree Collapse file tree 3 files changed +9
-21
lines changed Original file line number Diff line number Diff line change 77 <description >Project containing examples, exercises and answers for my open source WireMock workshop</description >
88 <properties >
99 <maven .compiler.release>17</maven .compiler.release>
10- <wiremock .version>3.9.2</wiremock .version>
11- <junit .version>5.11.3</junit .version>
12- <restassured .version>5.5.0</restassured .version>
13- <slf4j .version>2.0.16</slf4j .version>
14- <lombok .version>1.18.34</lombok .version>
15- <maven .surefire.plugin.version>3.5.2</maven .surefire.plugin.version>
10+ <wiremock .version>4.0.0-beta.15</wiremock .version>
11+ <junit .version>5.13.4</junit .version>
12+ <restassured .version>5.5.6</restassured .version>
13+ <slf4j .version>2.0.17</slf4j .version>
14+ <maven .surefire.plugin.version>3.5.4</maven .surefire.plugin.version>
1615 </properties >
1716 <dependencies >
1817 <dependency >
Original file line number Diff line number Diff line change @@ -33,18 +33,12 @@ public void setupStubExercise201() {
3333 /************************************************
3434 * Create a stub that will respond to all POST
3535 * requests to /requestLoan
36- * with HTTP status code 503 and a status message
37- * equal to 'Loan processor service unavailable'
38- *
39- * Have a look at https://wiremock.org/docs/stubbing/
40- * under 'Setting the response status message'
41- * for an example of how to do this
36+ * with HTTP status code 503
4237 ************************************************/
4338
4439 stubFor (post (urlEqualTo ("/requestLoan" ))
4540 .willReturn (aResponse ()
4641 .withStatus (503 )
47- .withStatusMessage ("Loan processor service unavailable" )
4842 ));
4943 }
5044
@@ -141,7 +135,7 @@ public void testExercise201() {
141135 assertThat ().
142136 statusCode (503 ).
143137 and ().
144- statusLine (org .hamcrest .Matchers .containsString ("Loan processor service unavailable " ));
138+ statusLine (org .hamcrest .Matchers .containsString ("Service Unavailable " ));
145139 }
146140
147141 @ Test
Original file line number Diff line number Diff line change @@ -33,12 +33,7 @@ public void setupStubExercise201() {
3333 /************************************************
3434 * Create a stub that will respond to all POST
3535 * requests to /requestLoan
36- * with HTTP status code 503 and a status message
37- * equal to 'Loan processor service unavailable'
38- *
39- * Have a look at https://wiremock.org/docs/stubbing/
40- * under 'Setting the response status message'
41- * for an example of how to do this
36+ * with HTTP status code 503
4237 ************************************************/
4338
4439 }
@@ -111,7 +106,7 @@ public void testExercise201() {
111106 assertThat ().
112107 statusCode (503 ).
113108 and ().
114- statusLine (org .hamcrest .Matchers .containsString ("Loan processor service unavailable " ));
109+ statusLine (org .hamcrest .Matchers .containsString ("Service Unavailable " ));
115110 }
116111
117112 @ Test
You can’t perform that action at this time.
0 commit comments