JAVA:8981: verify spring.mvc.pathmatch.matching-strategy property usage
This commit is contained in:
-14
@@ -19,20 +19,6 @@ public class EmployeeControllerContentNegotiationIntegrationTest {
|
||||
@Autowired
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Test
|
||||
public void whenEndpointUsingJsonSuffixCalled_thenJsonResponseObtained() throws Exception {
|
||||
this.mockMvc.perform(get("/employee/1.json"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(header().string(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenEndpointUsingXmlSuffixCalled_thenXmlResponseObtained() throws Exception {
|
||||
this.mockMvc.perform(get("/employee/1.xml"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(header().string(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML_VALUE));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenEndpointUsingJsonParameterCalled_thenJsonResponseObtained() throws Exception {
|
||||
this.mockMvc.perform(get("/employee/1?mediaType=json"))
|
||||
|
||||
Reference in New Issue
Block a user