From fb861c11577cfbb8ffa15b46d85d23ecb85a0286 Mon Sep 17 00:00:00 2001 From: chenlinghy Date: Sat, 9 May 2020 16:49:12 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E4=BF=AE=E6=94=B9=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=96=AD=E8=A8=80=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TaskControllerQATest.java | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/test/java/com/dispose/controller/TaskControllerQATest.java b/src/test/java/com/dispose/controller/TaskControllerQATest.java index f44ab448..ed235a02 100644 --- a/src/test/java/com/dispose/controller/TaskControllerQATest.java +++ b/src/test/java/com/dispose/controller/TaskControllerQATest.java @@ -666,11 +666,9 @@ public class TaskControllerQATest extends InitTestEnvironment { Assert.assertNotNull(task.getMessage()); if (task.getStatus() == 0) { - Assert.assertEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertEquals(task.getMessage(), "成功"); + Assert.assertEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } else { - Assert.assertNotEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertNotEquals(task.getMessage(), "成功"); + Assert.assertNotEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } if (task.getType() != null) { @@ -718,11 +716,9 @@ public class TaskControllerQATest extends InitTestEnvironment { Assert.assertNotNull(task.getMessage()); if (task.getStatus() == 0) { - Assert.assertEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertEquals(task.getMessage(), "成功"); + Assert.assertEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } else { - Assert.assertNotEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertNotEquals(task.getMessage(), "成功"); + Assert.assertNotEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } if (task.getType() != null) { @@ -881,11 +877,9 @@ public class TaskControllerQATest extends InitTestEnvironment { Assert.assertNotNull(task.getMessage()); if (task.getStatus() == 0) { - Assert.assertEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertEquals(task.getMessage(), "成功"); + Assert.assertEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } else { - Assert.assertNotEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertNotEquals(task.getMessage(), "成功"); + Assert.assertNotEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } if (task.getType() != null) { @@ -932,11 +926,9 @@ public class TaskControllerQATest extends InitTestEnvironment { Assert.assertNotNull(task.getMessage()); if (task.getStatus() == 0) { - Assert.assertEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertEquals(task.getMessage(), "成功"); + Assert.assertEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } else { - Assert.assertNotEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertNotEquals(task.getMessage(), "成功"); + Assert.assertNotEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } if (task.getType() != null) { @@ -984,11 +976,9 @@ public class TaskControllerQATest extends InitTestEnvironment { Assert.assertNotNull(task.getMessage()); if (task.getStatus() == 0) { - Assert.assertEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertEquals(task.getMessage(), "成功"); + Assert.assertEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } else { - Assert.assertNotEquals(String.valueOf(task.getStatus()), "0"); - Assert.assertNotEquals(task.getMessage(), "成功"); + Assert.assertNotEquals(Long.valueOf(task.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); } if (task.getType() != null) {