Browse files

fixes failing test

  • Loading branch information...
1 parent e445314 commit d7bf9c5af758cf8060e0c88bbd29b80854b672fc @mjg123 mjg123 committed Dec 19, 2011
View
9 ...driver/src/test/java/com/github/restdriver/clientdriver/unit/ClientDriverHandlerTest.java
@@ -99,19 +99,20 @@ public void testUnexpectedRequest() throws IOException, ServletException {
when(mockHttpRequest.getMethod()).thenReturn("POST");
when(mockHttpRequest.getPathInfo()).thenReturn("yarr");
when(mockHttpRequest.getQueryString()).thenReturn("gooo=gredge");
+ when(mockHttpRequest.getReader()).thenReturn(new BufferedReader(new StringReader("")));
try {
sut.handle("", mockRequest, mockHttpRequest, mockHttpResponse);
Assert.fail();
- } catch (ClientDriverInternalException bre) {
- assertThat(bre.getMessage(), equalTo("Unexpected request: POST yarr?gooo=gredge"));
+ } catch (ClientDriverInternalException e) {
+ assertThat(e.getMessage(), equalTo("Unexpected request: POST yarr?gooo=gredge"));
}
try {
sut.checkForUnexpectedRequests();
Assert.fail();
- } catch (ClientDriverFailedExpectationException bre) {
- assertThat(bre.getMessage(), equalTo("Unexpected request: POST yarr?gooo=gredge"));
+ } catch (ClientDriverFailedExpectationException e) {
+ assertThat(e.getMessage(), equalTo("Unexpected request: POST yarr?gooo=gredge"));
}
}

0 comments on commit d7bf9c5

Please sign in to comment.