36 lines
925 B
Java
36 lines
925 B
Java
|
package de.towerdefence.server;
|
||
|
|
||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||
|
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.test.context.ActiveProfiles;
|
||
|
import org.springframework.test.web.servlet.MockMvc;
|
||
|
|
||
|
@SpringBootTest
|
||
|
@AutoConfigureMockMvc(addFilters = false)
|
||
|
@ActiveProfiles("test")
|
||
|
public abstract class IntegrationTest {
|
||
|
|
||
|
protected final static String baseUri = "/api/v1";
|
||
|
|
||
|
@Autowired
|
||
|
protected MockMvc mvc;
|
||
|
@Autowired
|
||
|
protected ObjectMapper objectMapper;
|
||
|
|
||
|
@BeforeEach
|
||
|
void setUp() {
|
||
|
//repository.deleteAll();
|
||
|
}
|
||
|
|
||
|
@AfterEach
|
||
|
void cleanUp() {
|
||
|
//repository.deleteAll();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|