调整项目结构
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
package cn.alphaline.smartfactory;
|
||||
package tech.easyflow.manuagent;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import cn.alphaline.smartfactory.agent.AgentEventService;
|
||||
import cn.alphaline.smartfactory.artifact.ArtifactService;
|
||||
import cn.alphaline.smartfactory.artifact.DocxValidator;
|
||||
import cn.alphaline.smartfactory.project.ProjectService;
|
||||
import cn.alphaline.smartfactory.project.ProjectFileService;
|
||||
import tech.easyflow.manuagent.agent.AgentEventService;
|
||||
import tech.easyflow.manuagent.artifact.ArtifactService;
|
||||
import tech.easyflow.manuagent.artifact.DocxValidator;
|
||||
import tech.easyflow.manuagent.auth.UserService;
|
||||
import tech.easyflow.manuagent.project.ProjectService;
|
||||
import tech.easyflow.manuagent.project.ProjectFileService;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -212,7 +213,7 @@ class DatabaseAndEventIntegrationTest {
|
||||
""").param("id", UUID.randomUUID()).param("projectId", projectId).param("runId", runId)
|
||||
.param("sha", "0".repeat(64)).update();
|
||||
|
||||
ProjectService service = new ProjectService(jdbc, mock(cn.alphaline.smartfactory.auth.UserService.class), new ObjectMapper());
|
||||
ProjectService service = new ProjectService(jdbc, mock(UserService.class), new ObjectMapper());
|
||||
service.delete(projectId);
|
||||
|
||||
for (String table : List.of("agent_event", "artifact", "project_plan", "project_file", "agent_run")) {
|
||||
@@ -1,9 +1,9 @@
|
||||
package cn.alphaline.smartfactory;
|
||||
package tech.easyflow.manuagent;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import cn.alphaline.smartfactory.config.AppProperties;
|
||||
import cn.alphaline.smartfactory.model.KeyCipher;
|
||||
import tech.easyflow.manuagent.config.AppProperties;
|
||||
import tech.easyflow.manuagent.model.KeyCipher;
|
||||
import java.nio.file.Path;
|
||||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.alphaline.smartfactory.agent;
|
||||
package tech.easyflow.manuagent.agent;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.alphaline.smartfactory.agent;
|
||||
package tech.easyflow.manuagent.agent;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.alphaline.smartfactory.agent;
|
||||
package tech.easyflow.manuagent.agent;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.alphaline.smartfactory.agent;
|
||||
package tech.easyflow.manuagent.agent;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
@@ -1,9 +1,9 @@
|
||||
package cn.alphaline.smartfactory.artifact;
|
||||
package tech.easyflow.manuagent.artifact;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import cn.alphaline.smartfactory.common.ApiException;
|
||||
import tech.easyflow.manuagent.common.ApiException;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.alphaline.smartfactory.auth;
|
||||
package tech.easyflow.manuagent.auth;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -7,7 +7,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import cn.alphaline.smartfactory.common.GlobalExceptionHandler;
|
||||
import tech.easyflow.manuagent.common.GlobalExceptionHandler;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.alphaline.smartfactory.common;
|
||||
package tech.easyflow.manuagent.common;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package cn.alphaline.smartfactory.project;
|
||||
package tech.easyflow.manuagent.project;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import cn.alphaline.smartfactory.auth.UserService;
|
||||
import cn.alphaline.smartfactory.config.AppProperties;
|
||||
import tech.easyflow.manuagent.auth.UserService;
|
||||
import tech.easyflow.manuagent.common.ApiException;
|
||||
import tech.easyflow.manuagent.config.AppProperties;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.time.Duration;
|
||||
@@ -66,9 +67,9 @@ class ProjectFileServiceTest {
|
||||
ProjectFileService service = service();
|
||||
|
||||
assertThatThrownBy(() -> service.normalizeUploadPath("../企业材料.pdf", "企业材料.pdf"))
|
||||
.isInstanceOf(cn.alphaline.smartfactory.common.ApiException.class);
|
||||
.isInstanceOf(ApiException.class);
|
||||
assertThatThrownBy(() -> service.normalizeUploadPath("其他文件.pdf", "企业材料.pdf"))
|
||||
.isInstanceOf(cn.alphaline.smartfactory.common.ApiException.class);
|
||||
.isInstanceOf(ApiException.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.alphaline.smartfactory.skill;
|
||||
package tech.easyflow.manuagent.skill;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
Reference in New Issue
Block a user