Fix compiler warnings

This commit is contained in:
Andy Wilkinson
2016-04-04 13:26:41 +01:00
parent 83e8b92c3b
commit feb2f352f6
22 changed files with 77 additions and 47 deletions

View File

@@ -18,6 +18,7 @@ package com.example.mockmvc;
import org.junit.Before;
import org.junit.Rule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.restdocs.JUnitRestDocumentation;
import org.springframework.test.web.servlet.MockMvc;
@@ -31,12 +32,14 @@ public class ExampleApplicationTests {
@Rule
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation(
"target/generated-snippets");
@SuppressWarnings("unused")
// tag::setup[]
private MockMvc mockMvc;
@Autowired
private WebApplicationContext context;
private MockMvc mockMvc;
@Before
public void setUp() {
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)