From 00fc0bc5f79f7eef1d19ed72356b8d6729c24c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E7=9A=87?= Date: Thu, 5 Jul 2018 12:00:29 +0800 Subject: [PATCH] code clean up --- .../chyxion/tigon/webmvc/TigonReturnValueHandler.java | 1 - .../chyxion/tigon/webmvc/test/ControllerTestTool.java | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tigon-web/src/main/java/me/chyxion/tigon/webmvc/TigonReturnValueHandler.java b/tigon-web/src/main/java/me/chyxion/tigon/webmvc/TigonReturnValueHandler.java index 0819c50..27aa75e 100644 --- a/tigon-web/src/main/java/me/chyxion/tigon/webmvc/TigonReturnValueHandler.java +++ b/tigon-web/src/main/java/me/chyxion/tigon/webmvc/TigonReturnValueHandler.java @@ -14,7 +14,6 @@ import org.springframework.http.HttpStatus; import org.springframework.http.HttpHeaders; import org.apache.commons.lang3.StringUtils; import org.springframework.core.io.Resource; -import org.apache.commons.lang3.CharEncoding; import org.springframework.http.ResponseEntity; import org.springframework.core.MethodParameter; import org.springframework.beans.factory.annotation.Value; diff --git a/tigon-web/src/main/java/me/chyxion/tigon/webmvc/test/ControllerTestTool.java b/tigon-web/src/main/java/me/chyxion/tigon/webmvc/test/ControllerTestTool.java index 6acc680..6c17b1c 100644 --- a/tigon-web/src/main/java/me/chyxion/tigon/webmvc/test/ControllerTestTool.java +++ b/tigon-web/src/main/java/me/chyxion/tigon/webmvc/test/ControllerTestTool.java @@ -21,7 +21,7 @@ import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilde import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; /** - * Controler Test Tool + * Controller Test Tool * @version 0.1 * @author Shaun Chyxion
* chyxion@163.com
@@ -140,13 +140,13 @@ public final class ControllerTestTool { v = ((JSONObject) v).get(p); } } - Assert.isTrue(value.equals(v)); + Assert.isTrue(value.equals(v), "Assert failed"); } }); } catch (Exception e) { throw new IllegalStateException( - "Assert Mock HTTP Request JSON Result Value Error Caused", e); + "Assert mock http request JSON result value error caused", e); } } @@ -157,7 +157,7 @@ public final class ControllerTestTool { } catch (Exception e) { throw new IllegalStateException( - "Assert Mock HTTP Request Forward Error Caused", e); + "Assert Mock HTTP Request Forward Error Caused", e); } } @@ -179,7 +179,7 @@ public final class ControllerTestTool { } catch (Exception e) { throw new IllegalStateException( - "Mock HTTP Request Error Caused", e); + "Mock HTTP Request Error Caused", e); } } }