PMT-26 refactor GetAllEmployeesByProjectTest.java
All checks were successful
Quality Check / Validate OAS (push) Successful in 51s
Quality Check / Validate OAS (pull_request) Successful in 1m3s
Quality Check / Linting (push) Successful in 2m6s
Quality Check / Linting (pull_request) Successful in 2m16s
Quality Check / Testing (push) Successful in 2m23s
Quality Check / Static Analysis (push) Successful in 2m26s
Quality Check / Testing (pull_request) Successful in 2m19s
Quality Check / Static Analysis (pull_request) Successful in 2m23s

This commit is contained in:
Rajbir Singh 2024-10-23 13:01:32 +02:00 committed by Dominik Säume
parent f34e738895
commit 4a8d689df9

View file

@ -1,7 +1,6 @@
package de.hmmh.pmt.project; package de.hmmh.pmt.project;
import de.hmmh.pmt.IntegrationTest; import de.hmmh.pmt.IntegrationTest;
import de.hmmh.pmt.db.Allocation;
import de.hmmh.pmt.db.Project; import de.hmmh.pmt.db.Project;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@ -39,7 +38,7 @@ public class GetAllEmployeesByProjectTest extends IntegrationTest {
@Test @Test
void shouldReturnListOfEmployeesWhenAllParametersAreValid() throws Exception { void shouldReturnListOfEmployeesWhenAllParametersAreValid() throws Exception {
Map<String, Project> allProjects = createTestProjectData(); Map<String, Project> allProjects = createTestProjectData();
Map<String, Allocation> allocations = createTestAllocationData(allProjects); createTestAllocationData(allProjects);
this.mvc this.mvc
.perform(getRequest(allProjects.get("ai-research").getId())) .perform(getRequest(allProjects.get("ai-research").getId()))
@ -52,7 +51,7 @@ public class GetAllEmployeesByProjectTest extends IntegrationTest {
.thenThrow(new RestClientException("Internal Server Error")); .thenThrow(new RestClientException("Internal Server Error"));
Map<String, Project> allProjects = createTestProjectData(); Map<String, Project> allProjects = createTestProjectData();
Map<String, Allocation> allocations = createTestAllocationData(allProjects); createTestAllocationData(allProjects);
this.mvc this.mvc
.perform(getRequest(allProjects.get("ai-research").getId())) .perform(getRequest(allProjects.get("ai-research").getId()))