1. 添加策略模板API文档
This commit is contained in:
@@ -7,6 +7,7 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
@@ -57,7 +58,7 @@ class TaskServiceTest {
|
||||
@Test
|
||||
void testNewTaskLostData() {
|
||||
this.task.setTaskStartTime(null);
|
||||
assertThrows(PersistenceException.class, () -> {
|
||||
assertThrows(DataIntegrityViolationException.class, () -> {
|
||||
Long taskId = taskService.newTask(task);
|
||||
assertTrue(taskId > 0);
|
||||
});
|
||||
@@ -101,7 +102,7 @@ class TaskServiceTest {
|
||||
|
||||
@Test
|
||||
void testGetStaticCommands() {
|
||||
List<TaskCommandInfo> taskCommandInfos = taskService.getStaticCommandInfos(26L);
|
||||
assertEquals(3, taskCommandInfos.size());
|
||||
List<TaskCommandInfo> taskCommandInfos = taskService.getStaticCommandInfos(38L);
|
||||
assertNotNull(taskCommandInfos);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user