diff --git a/src/test/java/de/hmmh/pmt/project/GetProjectInfoTest.java b/src/test/java/de/hmmh/pmt/project/GetProjectInfoTest.java new file mode 100644 index 0000000..e77b2f1 --- /dev/null +++ b/src/test/java/de/hmmh/pmt/project/GetProjectInfoTest.java @@ -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); + } + +}