1. 添加策略模板API文档

This commit is contained in:
EnderByEndera
2024-01-12 19:24:19 +08:00
parent c1a5d2462f
commit 8a719709a3
33 changed files with 450 additions and 222 deletions

View File

@@ -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);
}
}