Fix
This commit is contained in:
parent
cda04fa8a2
commit
fa607435cf
@ -12,7 +12,9 @@ import org.springframework.test.web.servlet.MockMvc;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||||
@ -59,7 +61,7 @@ class CreateProjectActionTest {
|
|||||||
|
|
||||||
final long id = Long.parseLong(new JSONObject(contentAsString).get("id").toString());
|
final long id = Long.parseLong(new JSONObject(contentAsString).get("id").toString());
|
||||||
|
|
||||||
final ProjectEntity project = this.projectRepository.findById(id);
|
final Optional<ProjectEntity> project = this.projectRepository.findById(id);
|
||||||
assertThat(project.get().getName()).isEqualTo("name");
|
assertThat(project.get().getName()).isEqualTo("name");
|
||||||
assertThat(project.get().getLeadingEmployee()).isEqualTo(1);
|
assertThat(project.get().getLeadingEmployee()).isEqualTo(1);
|
||||||
assertThat(project.get().getContractor()).isEqualTo(4);
|
assertThat(project.get().getContractor()).isEqualTo(4);
|
||||||
|
Loading…
Reference in New Issue
Block a user