BAEL-4642: Open API Server Implementation using OpenAPI Generator (#10598)
* BAEL-4642: Open API Server Implementation using OpenAPI Generator * BAEL-4642: Open API Server Implementation using OpenAPI Generator * BAEL-4642
This commit is contained in:
+2
@@ -10,6 +10,8 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.JobRunrSpringBootApp;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.baeldung.openapi;
|
||||
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@AutoConfigureMockMvc
|
||||
public class OpenApiPetsIntegrationTest {
|
||||
|
||||
private static final String PETS_PATH = "/pets/";
|
||||
|
||||
@Autowired
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Test
|
||||
public void whenReadAll_thenStatusIsNotImplemented() throws Exception {
|
||||
this.mockMvc.perform(get(PETS_PATH)).andExpect(status().isNotImplemented());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenReadOne_thenStatusIsNotImplemented() throws Exception {
|
||||
this.mockMvc.perform(get(PETS_PATH + 1)).andExpect(status().isNotImplemented());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user