🐛 fixed 标签测试、银行账户测试
This commit is contained in:
parent
972065c635
commit
c976e5b460
@ -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
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user