should have one zero-argument constructor
This commit is contained in:
@@ -11,6 +11,7 @@ import com.jeesite.modules.sys.entity.Area;
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.Test;
|
||||
import org.junit.runners.MethodSorters;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
@@ -26,12 +27,13 @@ import java.util.Map;
|
||||
@ActiveProfiles("test")
|
||||
@SpringBootApplication
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@SpringBootTest(properties = {"spring.ai.tools.enabled=true"})
|
||||
@SpringBootTest(properties = {"spring.ai.model.chat=ollama","spring.ai.tools.enabled=true"})
|
||||
public class AiChatServiceTest extends BaseSpringContextTests {
|
||||
|
||||
private final AiCmsChatService aiCmsChatService;
|
||||
private AiCmsChatService aiCmsChatService;
|
||||
|
||||
public AiChatServiceTest(AiCmsChatService aiCmsChatService) {
|
||||
@Autowired
|
||||
public void setAiChatServiceTest(AiCmsChatService aiCmsChatService) {
|
||||
this.aiCmsChatService = aiCmsChatService;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.jeesite.modules.sys.dao.*;
|
||||
import com.jeesite.modules.sys.entity.*;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
@@ -35,14 +36,15 @@ import java.util.List;
|
||||
@SpringBootTest(classes = ApplicationTest.class)
|
||||
public class DaoMapperTest extends BaseSpringContextTests {
|
||||
|
||||
private final PostDao postDao;
|
||||
private final UserDao userDao;
|
||||
private final AreaDao areaDao;
|
||||
private final CompanyDao companyDao;
|
||||
private final FileUploadDao fileUploadDao;
|
||||
private final EmpUserDao empUserDao;
|
||||
private PostDao postDao;
|
||||
private UserDao userDao;
|
||||
private AreaDao areaDao;
|
||||
private CompanyDao companyDao;
|
||||
private FileUploadDao fileUploadDao;
|
||||
private EmpUserDao empUserDao;
|
||||
|
||||
public DaoMapperTest(PostDao postDao, UserDao userDao, AreaDao areaDao, CompanyDao companyDao,
|
||||
@Autowired
|
||||
public void setDaoMapperTest(PostDao postDao, UserDao userDao, AreaDao areaDao, CompanyDao companyDao,
|
||||
FileUploadDao fileUploadDao, EmpUserDao empUserDao) {
|
||||
this.postDao = postDao;
|
||||
this.userDao = userDao;
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.jeesite.modules.gen.entity.GenTable;
|
||||
import com.jeesite.modules.gen.entity.GenTableColumn;
|
||||
import com.jeesite.modules.gen.service.GenTableService;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.annotation.Rollback;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
@@ -25,9 +26,10 @@ import org.springframework.test.context.ActiveProfiles;
|
||||
@Rollback(false)
|
||||
public class GenTableToolTest extends BaseSpringContextTests {
|
||||
|
||||
private final GenTableService genTableService;
|
||||
private GenTableService genTableService;
|
||||
|
||||
public GenTableToolTest(GenTableService genTableService) {
|
||||
@Autowired
|
||||
public void setGenTableToolTest(GenTableService genTableService) {
|
||||
this.genTableService = genTableService;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.jeesite.modules.sys.service.UserService;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.annotation.Rollback;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
@@ -40,10 +41,11 @@ import java.util.List;
|
||||
@Rollback(false)
|
||||
public class MsgPushTest extends BaseSpringContextTests {
|
||||
|
||||
private final UserService userService;
|
||||
private final MsgTemplateService msgTemplateService;
|
||||
private UserService userService;
|
||||
private MsgTemplateService msgTemplateService;
|
||||
|
||||
public MsgPushTest(UserService userService, MsgTemplateService msgTemplateService) {
|
||||
@Autowired
|
||||
public void setMsgPushTest(UserService userService, MsgTemplateService msgTemplateService) {
|
||||
this.userService = userService;
|
||||
this.msgTemplateService = msgTemplateService;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.jeesite.common.tests.BaseSpringContextTests;
|
||||
import com.jeesite.modules.test.dao.TestDataDao;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
@@ -23,9 +24,10 @@ import java.util.List;
|
||||
@SpringBootTest(classes = ApplicationTest.class)
|
||||
public class InsertBatchTest extends BaseSpringContextTests {
|
||||
|
||||
private final TestDataDao testDataDao;
|
||||
private TestDataDao testDataDao;
|
||||
|
||||
public InsertBatchTest(TestDataDao testDataDao) {
|
||||
@Autowired
|
||||
public void setInsertBatchTest(TestDataDao testDataDao) {
|
||||
this.testDataDao = testDataDao;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
import com.jeesite.modules.test.service.TestDataService;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
@@ -31,9 +32,10 @@ import java.util.concurrent.Executors;
|
||||
@SpringBootTest(classes = ApplicationTest.class)
|
||||
public class MultiDataSourceTest extends BaseSpringContextTests {
|
||||
|
||||
private final TestDataService testDataService;
|
||||
private TestDataService testDataService;
|
||||
|
||||
public MultiDataSourceTest(TestDataService testDataService) {
|
||||
@Autowired
|
||||
public void setMultiDataSourceTest(TestDataService testDataService) {
|
||||
this.testDataService = testDataService;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user