Consistent use of <pre class="code">
Issue: SPR-8108
This commit is contained in:
@@ -39,7 +39,7 @@ import org.springframework.web.client.support.RestGatewaySupport;
|
||||
* actual running server.
|
||||
*
|
||||
* <p>Below is an example:
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* RestTemplate restTemplate = new RestTemplate()
|
||||
* MockRestServiceServer mockServer = MockRestServiceServer.createServer(restTemplate);
|
||||
*
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* <p>Below is an example:
|
||||
*
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* static imports:
|
||||
* MockMvcBuilders.*, MockMvcRequestBuilders.*, MockMvcResultMatchers.*
|
||||
*
|
||||
|
||||
@@ -31,7 +31,7 @@ public interface ResultActions {
|
||||
|
||||
/**
|
||||
* Provide an expectation. For example:
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
|
||||
*
|
||||
* mockMvc.perform(get("/person/1"))
|
||||
@@ -52,7 +52,7 @@ public interface ResultActions {
|
||||
|
||||
/**
|
||||
* Provide a general action. For example:
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
|
||||
*
|
||||
* mockMvc.perform(get("/form")).andDo(print());
|
||||
|
||||
@@ -25,7 +25,7 @@ package org.springframework.test.web.servlet;
|
||||
*
|
||||
* <p>Example:
|
||||
*
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* static imports: MockMvcRequestBuilders.*, MockMvcResultHandlers.*
|
||||
*
|
||||
* mockMvc.perform(get("/form")).andDo(print());
|
||||
|
||||
@@ -24,7 +24,7 @@ package org.springframework.test.web.servlet;
|
||||
*
|
||||
* <p>Example:
|
||||
*
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
|
||||
*
|
||||
* mockMvc.perform(get("/form"))
|
||||
|
||||
@@ -117,14 +117,14 @@ public abstract class MockMvcRequestBuilders {
|
||||
* {@link MvcResult} of the request that started async processing.
|
||||
*
|
||||
* <p>Usage involves performing one request first that starts async processing:
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* MvcResult mvcResult = this.mockMvc.perform(get("/1"))
|
||||
* .andExpect(request().asyncStarted())
|
||||
* .andReturn();
|
||||
* </pre>
|
||||
*
|
||||
* <p>And then performing the async dispatch re-using the {@code MvcResult}:
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* this.mockMvc.perform(asyncDispatch(mvcResult))
|
||||
* .andExpect(status().isOk())
|
||||
* .andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
|
||||
@@ -117,7 +117,7 @@ public class ContentResultMatchers {
|
||||
|
||||
/**
|
||||
* Assert the response body content with a Hamcrest {@link Matcher}.
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* mockMvc.perform(get("/path"))
|
||||
* .andExpect(content(containsString("text")));
|
||||
* </pre>
|
||||
|
||||
Reference in New Issue
Block a user