Fix compiler warnings
This commit is contained in:
@@ -37,6 +37,7 @@ public class CustomDefaultSnippets {
|
||||
@Autowired
|
||||
private WebApplicationContext context;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Before
|
||||
|
||||
@@ -20,7 +20,6 @@ import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
@@ -35,6 +34,7 @@ public class CustomEncoding {
|
||||
@Autowired
|
||||
private WebApplicationContext context;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Before
|
||||
|
||||
@@ -20,7 +20,6 @@ import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
import org.springframework.restdocs.templates.TemplateFormats;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
@@ -36,6 +35,7 @@ public class CustomFormat {
|
||||
@Autowired
|
||||
private WebApplicationContext context;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Before
|
||||
|
||||
@@ -20,7 +20,6 @@ import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
@@ -35,6 +34,7 @@ public class CustomUriConfiguration {
|
||||
@Autowired
|
||||
private WebApplicationContext context;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Before
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.mockmvc;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
import org.springframework.restdocs.mockmvc.RestDocumentationResultHandler;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
|
||||
@@ -32,12 +32,13 @@ public class ExampleApplicationTestNgTests {
|
||||
|
||||
public final ManualRestDocumentation restDocumentation = new ManualRestDocumentation(
|
||||
"target/generated-snippets");
|
||||
@SuppressWarnings("unused")
|
||||
// tag::setup[]
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Autowired
|
||||
private WebApplicationContext context;
|
||||
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@BeforeMethod
|
||||
public void setUp(Method method) {
|
||||
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.mockmvc;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
@@ -32,6 +31,7 @@ public class ParameterizedOutput {
|
||||
@Rule
|
||||
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("build");
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private MockMvc mockMvc;
|
||||
|
||||
private WebApplicationContext context;
|
||||
|
||||
@@ -32,6 +32,7 @@ public class CustomDefaultSnippets {
|
||||
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation(
|
||||
"build");
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private RequestSpecification spec;
|
||||
|
||||
@Before
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.restassured;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
|
||||
import com.jayway.restassured.builder.RequestSpecBuilder;
|
||||
import com.jayway.restassured.specification.RequestSpecification;
|
||||
@@ -31,6 +30,7 @@ public class CustomEncoding {
|
||||
@Rule
|
||||
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("build");
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private RequestSpecification spec;
|
||||
|
||||
@Before
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.restassured;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
import org.springframework.restdocs.templates.TemplateFormats;
|
||||
|
||||
import com.jayway.restassured.builder.RequestSpecBuilder;
|
||||
@@ -31,7 +30,8 @@ public class CustomFormat {
|
||||
|
||||
@Rule
|
||||
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("build");
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private RequestSpecification spec;
|
||||
|
||||
@Before
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.restassured;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
import org.springframework.restdocs.restassured.RestDocumentationFilter;
|
||||
|
||||
import com.jayway.restassured.RestAssured;
|
||||
|
||||
@@ -32,6 +32,7 @@ public class ExampleApplicationTestNgTests {
|
||||
private final ManualRestDocumentation restDocumentation = new ManualRestDocumentation(
|
||||
"build/generated-snippets");
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
// tag::setup[]
|
||||
private RequestSpecification spec;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.restassured;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
|
||||
import com.jayway.restassured.builder.RequestSpecBuilder;
|
||||
import com.jayway.restassured.specification.RequestSpecification;
|
||||
@@ -32,6 +31,7 @@ public class ExampleApplicationTests {
|
||||
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation(
|
||||
"build/generated-snippets");
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
// tag::setup[]
|
||||
private RequestSpecification spec;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.restassured;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.springframework.restdocs.JUnitRestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
|
||||
import com.jayway.restassured.builder.RequestSpecBuilder;
|
||||
import com.jayway.restassured.specification.RequestSpecification;
|
||||
@@ -33,6 +32,7 @@ public class ParameterizedOutput {
|
||||
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation(
|
||||
"build/generated-snippets");
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private RequestSpecification spec;
|
||||
|
||||
// tag::parameterized-output[]
|
||||
|
||||
Reference in New Issue
Block a user