PMT-37-added uncompleted Test cases
All checks were successful
Quality Check / Validate OAS (push) Successful in 33s
Quality Check / Linting (push) Successful in 1m10s
Quality Check / Static Analysis (push) Successful in 1m20s
Quality Check / Testing (push) Successful in 1m19s

This commit is contained in:
Ole Kück 2024-10-23 15:31:47 +02:00
parent 8ea7bf798f
commit 089b777ea8
Signed by: SZUT-Ole
GPG key ID: 0A1DF1B37C4A1E4C

View file

@ -0,0 +1,31 @@
package de.hmmh.pmt.project;
import static org.hamcrest.Matchers.empty;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.junit.jupiter.api.Test;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.RequestBuilder;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import de.hmmh.pmt.IntegrationTest;
public class GetProjectInfoTest extends IntegrationTest {
@Test
void noProject() throws Exception {
mvc
.perform(get(baseUri + "/project/1"))
.andExpect(status().isNotFound());
}
@Test
public RequestBuilder getProjectInfo(Long projectId) throws Exception {
return MockMvcRequestBuilders
.get("/project/" + projectId)
.contentType(MediaType.APPLICATION_JSON);
}
}