feat: Implement add employee to project route (SCRUM-2) #32
@ -2,7 +2,6 @@ package de.szut.lf8_starter.integration.project;
|
|||||||
|
|
||||||
import de.szut.lf8_starter.project.ProjectEntity;
|
import de.szut.lf8_starter.project.ProjectEntity;
|
||||||
import de.szut.lf8_starter.project.ProjectRepository;
|
import de.szut.lf8_starter.project.ProjectRepository;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
@ -25,11 +24,6 @@ class GetProjectActionTest {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ProjectRepository projectRepository;
|
private ProjectRepository projectRepository;
|
||||||
|
|
||||||
@BeforeEach
|
|
||||||
void setUp() {
|
|
||||||
this.projectRepository.deleteAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getProjectTest() throws Exception {
|
void getProjectTest() throws Exception {
|
||||||
var project = new ProjectEntity();
|
var project = new ProjectEntity();
|
||||||
@ -60,6 +54,6 @@ class GetProjectActionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getProjectShouldReturnNotFoundResponseWhenProjectIsNotFound() throws Exception {
|
void getProjectShouldReturnNotFoundResponseWhenProjectIsNotFound() throws Exception {
|
||||||
this.mockMvc.perform(get("/projects/2")).andExpect(status().isNotFound());
|
this.mockMvc.perform(get("/projects/1111")).andExpect(status().isNotFound());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user