From c976e5b460dd674ffcc3214f824d4461968247e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=A0=E4=B8=80=E4=B8=AA=E4=BA=BA=E5=9C=A8=E8=BF=99?= =?UTF-8?q?=E5=84=BF=E5=B9=B2=E5=98=9B=E4=BD=A0=E6=98=AF=E6=9D=A5=E6=8B=89?= =?UTF-8?q?=E5=B1=8E=E7=9A=84=E5=90=A7?= <1421374934@qq.com> Date: Tue, 11 Apr 2023 11:06:39 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20fixed=20=E6=A0=87=E7=AD=BE=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E3=80=81=E9=93=B6=E8=A1=8C=E8=B4=A6=E6=88=B7=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../forest/service/BankAccountServiceTest.java | 2 +- .../com/rymcu/forest/service/TagServiceTest.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/com/rymcu/forest/service/BankAccountServiceTest.java b/src/test/java/com/rymcu/forest/service/BankAccountServiceTest.java index 81300e2..536dc79 100644 --- a/src/test/java/com/rymcu/forest/service/BankAccountServiceTest.java +++ b/src/test/java/com/rymcu/forest/service/BankAccountServiceTest.java @@ -46,7 +46,7 @@ public class BankAccountServiceTest extends BaseServiceTest { @DisplayName("测试查询银行账户列表") public void findBankAccounts() { List bankAccounts = bankAccountService.findBankAccounts(bankAccountSearchDTO); - assertEquals(1L, bankAccounts.size()); + assertEquals(3, bankAccounts.size()); } @Test diff --git a/src/test/java/com/rymcu/forest/service/TagServiceTest.java b/src/test/java/com/rymcu/forest/service/TagServiceTest.java index f18c782..cec45e6 100644 --- a/src/test/java/com/rymcu/forest/service/TagServiceTest.java +++ b/src/test/java/com/rymcu/forest/service/TagServiceTest.java @@ -105,8 +105,8 @@ class TagServiceTest extends BaseServiceTest { assertFalse(b); Tag tag = new Tag(); - tag.setTagDescription("test"); - tag.setTagTitle("test"); + tag.setTagDescription("test1"); + tag.setTagTitle("test1"); Tag tag1 = tagService.saveTag(tag); assertNotNull(tag1.getIdTag()); @@ -118,19 +118,19 @@ class TagServiceTest extends BaseServiceTest { @DisplayName("添加/更新标签") void saveTag() throws Exception { List tagLabels = tagService.findTagLabels(); - assertTrue(tagLabels.isEmpty()); + assertEquals(1, tagLabels.size()); Tag tag = new Tag(); - tag.setTagDescription("test"); + tag.setTagDescription("test1"); assertThrows(IllegalArgumentException.class, () -> tagService.saveTag(tag)); - tag.setTagTitle("test"); + tag.setTagTitle("test1"); Tag tag1 = tagService.saveTag(tag); assertNotNull(tag1.getIdTag()); tagLabels = tagService.findTagLabels(); - assertTrue(tagLabels.isEmpty()); + assertEquals(1, tagLabels.size()); tag.setIdTag(null); assertThrows(BusinessException.class, () -> tagService.saveTag(tag)); @@ -140,6 +140,6 @@ class TagServiceTest extends BaseServiceTest { @DisplayName("获取标签列表") void findTagLabels() { List tagLabels = tagService.findTagLabels(); - assertTrue(tagLabels.isEmpty()); + assertFalse(tagLabels.isEmpty()); } } \ No newline at end of file