|
|
@ -108,8 +108,8 @@ public class TaskServiceImplTest extends BaseDbUnitTest { |
|
|
|
public void testGetTaskPage() { |
|
|
|
public void testGetTaskPage() { |
|
|
|
// mock 数据
|
|
|
|
// mock 数据
|
|
|
|
TaskDO dbTask = randomPojo(TaskDO.class, o -> { // 等会查询到
|
|
|
|
TaskDO dbTask = randomPojo(TaskDO.class, o -> { // 等会查询到
|
|
|
|
o.setName(null); |
|
|
|
// o.setName(null);
|
|
|
|
o.setContent(null); |
|
|
|
// o.setContent(null);
|
|
|
|
o.setResources(null); |
|
|
|
o.setResources(null); |
|
|
|
o.setImages(null); |
|
|
|
o.setImages(null); |
|
|
|
o.setPlanStartTime(null); |
|
|
|
o.setPlanStartTime(null); |
|
|
@ -118,10 +118,10 @@ public class TaskServiceImplTest extends BaseDbUnitTest { |
|
|
|
o.setCreateTime(null); |
|
|
|
o.setCreateTime(null); |
|
|
|
}); |
|
|
|
}); |
|
|
|
taskMapper.insert(dbTask); |
|
|
|
taskMapper.insert(dbTask); |
|
|
|
// 测试 name 不匹配
|
|
|
|
// // 测试 name 不匹配
|
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setName(null))); |
|
|
|
// taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setName(null)));
|
|
|
|
// 测试 content 不匹配
|
|
|
|
// // 测试 content 不匹配
|
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setContent(null))); |
|
|
|
// taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setContent(null)));
|
|
|
|
// 测试 resources 不匹配
|
|
|
|
// 测试 resources 不匹配
|
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setResources(null))); |
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setResources(null))); |
|
|
|
// 测试 images 不匹配
|
|
|
|
// 测试 images 不匹配
|
|
|
@ -136,8 +136,8 @@ public class TaskServiceImplTest extends BaseDbUnitTest { |
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setCreateTime(null))); |
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setCreateTime(null))); |
|
|
|
// 准备参数
|
|
|
|
// 准备参数
|
|
|
|
TaskPageReqVO reqVO = new TaskPageReqVO(); |
|
|
|
TaskPageReqVO reqVO = new TaskPageReqVO(); |
|
|
|
reqVO.setName(null); |
|
|
|
// reqVO.setName(null);
|
|
|
|
reqVO.setContent(null); |
|
|
|
// reqVO.setContent(null);
|
|
|
|
reqVO.setResources(null); |
|
|
|
reqVO.setResources(null); |
|
|
|
reqVO.setImages(null); |
|
|
|
reqVO.setImages(null); |
|
|
|
reqVO.setBeginPlanStartTime(null); |
|
|
|
reqVO.setBeginPlanStartTime(null); |
|
|
@ -161,8 +161,8 @@ public class TaskServiceImplTest extends BaseDbUnitTest { |
|
|
|
public void testGetTaskList() { |
|
|
|
public void testGetTaskList() { |
|
|
|
// mock 数据
|
|
|
|
// mock 数据
|
|
|
|
TaskDO dbTask = randomPojo(TaskDO.class, o -> { // 等会查询到
|
|
|
|
TaskDO dbTask = randomPojo(TaskDO.class, o -> { // 等会查询到
|
|
|
|
o.setName(null); |
|
|
|
// o.setName(null);
|
|
|
|
o.setContent(null); |
|
|
|
// o.setContent(null);
|
|
|
|
o.setResources(null); |
|
|
|
o.setResources(null); |
|
|
|
o.setImages(null); |
|
|
|
o.setImages(null); |
|
|
|
o.setPlanStartTime(null); |
|
|
|
o.setPlanStartTime(null); |
|
|
@ -172,9 +172,9 @@ public class TaskServiceImplTest extends BaseDbUnitTest { |
|
|
|
}); |
|
|
|
}); |
|
|
|
taskMapper.insert(dbTask); |
|
|
|
taskMapper.insert(dbTask); |
|
|
|
// 测试 name 不匹配
|
|
|
|
// 测试 name 不匹配
|
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setName(null))); |
|
|
|
// taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setName(null)));
|
|
|
|
// 测试 content 不匹配
|
|
|
|
// // 测试 content 不匹配
|
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setContent(null))); |
|
|
|
// taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setContent(null)));
|
|
|
|
// 测试 resources 不匹配
|
|
|
|
// 测试 resources 不匹配
|
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setResources(null))); |
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setResources(null))); |
|
|
|
// 测试 images 不匹配
|
|
|
|
// 测试 images 不匹配
|
|
|
@ -189,8 +189,8 @@ public class TaskServiceImplTest extends BaseDbUnitTest { |
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setCreateTime(null))); |
|
|
|
taskMapper.insert(cloneIgnoreId(dbTask, o -> o.setCreateTime(null))); |
|
|
|
// 准备参数
|
|
|
|
// 准备参数
|
|
|
|
TaskExportReqVO reqVO = new TaskExportReqVO(); |
|
|
|
TaskExportReqVO reqVO = new TaskExportReqVO(); |
|
|
|
reqVO.setName(null); |
|
|
|
// reqVO.setName(null);
|
|
|
|
reqVO.setContent(null); |
|
|
|
// reqVO.setContent(null);
|
|
|
|
reqVO.setResources(null); |
|
|
|
reqVO.setResources(null); |
|
|
|
reqVO.setImages(null); |
|
|
|
reqVO.setImages(null); |
|
|
|
reqVO.setBeginPlanStartTime(null); |
|
|
|
reqVO.setBeginPlanStartTime(null); |
|
|
|