Skip to content

Commit

Permalink
Delete superfluous fail() invocations in RequestResponseBodyMethodPro…
Browse files Browse the repository at this point in the history
…cessorTests

Several test methods in RequestResponseBodyMethodProcessorTests
are currently annotated with @test(expected=…) and additionally contain:

    fail("Expected exception");

This combination is superfluous, and the unnecessary fail() invocations
have therefore been removed.
  • Loading branch information
sbrannen committed May 18, 2012
1 parent 77ae101 commit 09d98fd
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,21 +196,17 @@ public void resolveArgumentNotReadable() throws Exception {
replay(messageConverter);

processor.resolveArgument(paramRequestBodyString, mavContainer, webRequest, null);

fail("Expected exception");
}

@Test(expected = HttpMediaTypeNotSupportedException.class)
public void resolveArgumentNoContentType() throws Exception {
servletRequest.setContent(new byte[] {});
processor.resolveArgument(paramRequestBodyString, mavContainer, webRequest, null);
fail("Expected exception");
}

@Test(expected = HttpMessageNotReadableException.class)
public void resolveArgumentRequiredNoContent() throws Exception {
processor.resolveArgument(paramRequestBodyString, mavContainer, webRequest, null);
fail("Expected exception");
}

@Test
Expand Down Expand Up @@ -265,8 +261,6 @@ public void handleReturnValueNotAcceptable() throws Exception {
replay(messageConverter);

processor.handleReturnValue("Foo", returnTypeString, mavContainer, webRequest);

fail("Expected exception");
}

@Test(expected = HttpMediaTypeNotAcceptableException.class)
Expand All @@ -280,8 +274,6 @@ public void handleReturnValueNotAcceptableProduces() throws Exception {
replay(messageConverter);

processor.handleReturnValue("Foo", returnTypeStringProduces, mavContainer, webRequest);

fail("Expected exception");
}

// SPR-9160
Expand Down

0 comments on commit 09d98fd

Please sign in to comment.