From 8712d954e2189b5d7bde7861389a91a5ac9acdef Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Sat, 15 Apr 2023 03:57:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=8C=E4=BD=93=E7=8E=B0=20RestfulResult#successIf?= =?UTF-8?q?=20=E6=96=B9=E6=B3=95=E5=85=81=E8=AE=B8=E5=8F=AA=E4=BC=A0?= =?UTF-8?q?=E5=85=A5=20condition=20=E5=8F=82=E6=95=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xyz/zhouxy/plusone/commons/util/RestfulResultTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/java/xyz/zhouxy/plusone/commons/util/RestfulResultTest.java b/src/test/java/xyz/zhouxy/plusone/commons/util/RestfulResultTest.java index 6255a67..979deb7 100644 --- a/src/test/java/xyz/zhouxy/plusone/commons/util/RestfulResultTest.java +++ b/src/test/java/xyz/zhouxy/plusone/commons/util/RestfulResultTest.java @@ -11,8 +11,7 @@ class RestfulResultTest { @Test void testSuccessIf() { String str = null; - RestfulResult result = RestfulResult.successIf(str != null, "成功") - .orError(); + RestfulResult result = RestfulResult.successIf(str != null).orError(); log.info(result.toString()); assertEquals(RestfulResult.DEFAULT_ERROR_STATUS, result.getStatus()); @@ -23,8 +22,7 @@ class RestfulResultTest { assertEquals("失败", result.getMessage()); str = ""; - result = RestfulResult.successIf(str != null, "成功") - .orError(); + result = RestfulResult.successIf(str != null).orError(); log.info(result.toString()); assertEquals(RestfulResult.SUCCESS_STATUS, result.getStatus());