Compare commits
3 commits
5c06b052af
...
0e4d58dc50
Author | SHA1 | Date | |
---|---|---|---|
0e4d58dc50 | |||
2e424484c3 | |||
cdb60f0d86 |
3 changed files with 14 additions and 1 deletions
|
@ -110,6 +110,7 @@ tasks {
|
|||
}
|
||||
withType<Test> {
|
||||
useJUnitPlatform()
|
||||
maxParallelForks = 1
|
||||
}
|
||||
named("compileJava").configure {
|
||||
dependsOn(swaggerSources.getByName("pmt").code)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"invokerPackage": "de.hmmh.pmt",
|
||||
"java8": false,
|
||||
"java11": true,
|
||||
"dateLibrary": "java11",
|
||||
"dateLibrary": "java8-localdatetime",
|
||||
"library": "spring-boot3",
|
||||
"defaultInterfaces": false,
|
||||
"serializableModel": true
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
package de.hmmh.pmt;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import de.hmmh.pmt.db.Project;
|
||||
import de.hmmh.pmt.db.ProjectRepository;
|
||||
import de.hmmh.pmt.employee.ApiClientFactory;
|
||||
import de.hmmh.pmt.employee.api.EmployeeControllerApi;
|
||||
import de.hmmh.pmt.employee.api.QualificationControllerApi;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
|
@ -23,8 +28,15 @@ public abstract class IntegrationTest {
|
|||
@Autowired
|
||||
protected MockMvc mvc;
|
||||
@Autowired
|
||||
protected ObjectMapper objectMapper;
|
||||
@Autowired
|
||||
protected ProjectRepository projectRepository;
|
||||
|
||||
@MockBean
|
||||
protected EmployeeControllerApi mockEmployeeApi;
|
||||
@MockBean
|
||||
protected QualificationControllerApi mockQualificationApi;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
projectRepository.deleteAll();
|
||||
|
|
Loading…
Reference in a new issue