From 09d98fd3ae88eaf878bda27f5a1277c171378c72 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 18 May 2012 03:10:13 +0200 Subject: [PATCH] Delete superfluous fail() invocations in RequestResponseBodyMethodProcessorTests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../RequestResponseBodyMethodProcessorTests.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java index c3d25230524..35170a73769 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java @@ -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