REM:
1. 增加数据库测试用例
This commit is contained in:
chenlinghy 2020-07-08 09:29:41 +08:00
parent 121c94a5ba
commit 37c5f5827a
1 changed files with 24 additions and 1 deletions

View File

@ -171,12 +171,35 @@ public class TaskInfoMapperTest extends InitTestEnvironment {
taskInfo.getId(), taskInfo.getStatus(), changeStatus);
taskInfoMapper.changeTaskInfoStatus(taskInfo.getId(), changeStatus);
Assert.assertNotEquals(beforeStatus, new Long((long) taskInfoMapper.getTaskInfoCurrentStatus(taskInfo.getId())));
Assert.assertNotEquals(beforeStatus, new Long(taskInfoMapper.getTaskInfoCurrentStatus(taskInfo.getId())));
}
}
}
}
}
/**
* T 5 del task information by deviceId.
*/
@Test
public void t5_removeTaskInfoById() {
List<TaskInfoDetail> taskInfoDetailList = disposeTaskMapper.getAllTaskByType(DeviceCapacity.CLEANUP.getCode());
if (taskInfoDetailList.size() > 0) {
for (TaskInfoDetail task : taskInfoDetailList
) {
log.info("taskId:{}", task.getId());
TaskInfo taskInfo = taskInfoMapper.getTaskInfo(task.getId(), task.getDeviceId());
if (taskInfo != null) {
Assert.assertNotNull(taskInfo);
taskInfoMapper.removeTaskInfoById(task.getDeviceId());
taskInfo = taskInfoMapper.getTaskInfo(task.getId(), task.getDeviceId());
Assert.assertNull(taskInfo);
}
}
}
}
}