🐛 fixed 标签测试、银行账户测试

This commit is contained in:
你一个人在这儿干嘛你是来拉屎的吧 2023-04-11 11:06:39 +08:00 committed by Zeeland
parent 83fb8d5330
commit 699d3fc217
2 changed files with 8 additions and 8 deletions

View File

@ -46,7 +46,7 @@ public class BankAccountServiceTest extends BaseServiceTest {
@DisplayName("测试查询银行账户列表") @DisplayName("测试查询银行账户列表")
public void findBankAccounts() { public void findBankAccounts() {
List<BankAccountDTO> bankAccounts = bankAccountService.findBankAccounts(bankAccountSearchDTO); List<BankAccountDTO> bankAccounts = bankAccountService.findBankAccounts(bankAccountSearchDTO);
assertEquals(1L, bankAccounts.size()); assertEquals(3, bankAccounts.size());
} }
@Test @Test

View File

@ -105,8 +105,8 @@ class TagServiceTest extends BaseServiceTest {
assertFalse(b); assertFalse(b);
Tag tag = new Tag(); Tag tag = new Tag();
tag.setTagDescription("test"); tag.setTagDescription("test1");
tag.setTagTitle("test"); tag.setTagTitle("test1");
Tag tag1 = tagService.saveTag(tag); Tag tag1 = tagService.saveTag(tag);
assertNotNull(tag1.getIdTag()); assertNotNull(tag1.getIdTag());
@ -118,19 +118,19 @@ class TagServiceTest extends BaseServiceTest {
@DisplayName("添加/更新标签") @DisplayName("添加/更新标签")
void saveTag() throws Exception { void saveTag() throws Exception {
List<LabelModel> tagLabels = tagService.findTagLabels(); List<LabelModel> tagLabels = tagService.findTagLabels();
assertTrue(tagLabels.isEmpty()); assertEquals(1, tagLabels.size());
Tag tag = new Tag(); Tag tag = new Tag();
tag.setTagDescription("test"); tag.setTagDescription("test1");
assertThrows(IllegalArgumentException.class, () -> tagService.saveTag(tag)); assertThrows(IllegalArgumentException.class, () -> tagService.saveTag(tag));
tag.setTagTitle("test"); tag.setTagTitle("test1");
Tag tag1 = tagService.saveTag(tag); Tag tag1 = tagService.saveTag(tag);
assertNotNull(tag1.getIdTag()); assertNotNull(tag1.getIdTag());
tagLabels = tagService.findTagLabels(); tagLabels = tagService.findTagLabels();
assertTrue(tagLabels.isEmpty()); assertEquals(1, tagLabels.size());
tag.setIdTag(null); tag.setIdTag(null);
assertThrows(BusinessException.class, () -> tagService.saveTag(tag)); assertThrows(BusinessException.class, () -> tagService.saveTag(tag));
@ -140,6 +140,6 @@ class TagServiceTest extends BaseServiceTest {
@DisplayName("获取标签列表") @DisplayName("获取标签列表")
void findTagLabels() { void findTagLabels() {
List<LabelModel> tagLabels = tagService.findTagLabels(); List<LabelModel> tagLabels = tagService.findTagLabels();
assertTrue(tagLabels.isEmpty()); assertFalse(tagLabels.isEmpty());
} }
} }