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