| | |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; |
| | |
| | | } |
| | | |
| | | @Test |
| | | public void testGetNotifyTemplateListByStatus() { |
| | | // mock 数据 |
| | | NotifyTemplateDO dbNotifyTemplate = randomPojo(NotifyTemplateDO.class, |
| | | o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus())); |
| | | notifyTemplateMapper.insert(dbNotifyTemplate); |
| | | notifyTemplateMapper.insert(cloneIgnoreId(dbNotifyTemplate, |
| | | o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); |
| | | |
| | | // 调用 |
| | | List<NotifyTemplateDO> list = notifyTemplateService.getNotifyTemplateListByStatus( |
| | | CommonStatusEnum.ENABLE.getStatus()); |
| | | // 断言 |
| | | assertEquals(1, list.size()); |
| | | assertPojoEquals(dbNotifyTemplate, list.get(0)); |
| | | } |
| | | |
| | | @Test |
| | | public void testGetNotifyTemplate() { |
| | | // mock 数据 |
| | | NotifyTemplateDO dbNotifyTemplate = randomPojo(NotifyTemplateDO.class); |