Delete superfluous fail() invocations in RequestResponseBodyMethodProcessorTests
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.
This commit is contained in:
parent
77ae101402
commit
09d98fd3ae
|
|
@ -196,21 +196,17 @@ public class RequestResponseBodyMethodProcessorTests {
|
|||
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
|
||||
|
|
@ -265,8 +261,6 @@ public class RequestResponseBodyMethodProcessorTests {
|
|||
replay(messageConverter);
|
||||
|
||||
processor.handleReturnValue("Foo", returnTypeString, mavContainer, webRequest);
|
||||
|
||||
fail("Expected exception");
|
||||
}
|
||||
|
||||
@Test(expected = HttpMediaTypeNotAcceptableException.class)
|
||||
|
|
@ -280,8 +274,6 @@ public class RequestResponseBodyMethodProcessorTests {
|
|||
replay(messageConverter);
|
||||
|
||||
processor.handleReturnValue("Foo", returnTypeStringProduces, mavContainer, webRequest);
|
||||
|
||||
fail("Expected exception");
|
||||
}
|
||||
|
||||
// SPR-9160
|
||||
|
|
|
|||
Loading…
Reference in New Issue