Remove use of deprecated API in REST Docs auto-config test

Closes gh-6128
This commit is contained in:
Andy Wilkinson
2016-06-13 11:14:12 +01:00
parent 0fd7739ec7
commit 50ca35bdae

View File

@@ -59,14 +59,12 @@ public class RestDocsAutoConfigurationAdvancedConfigurationIntegrationTests {
private MockMvc mvc;
@Autowired
private RestDocumentationResultHandler document;
private RestDocumentationResultHandler documentationHandler;
@Test
@Deprecated
public void snippetGeneration() throws Exception {
this.document.snippets(links(
linkWithRel("self").description("Canonical location of this resource")));
this.mvc.perform(get("/"));
this.mvc.perform(get("/")).andDo(this.documentationHandler.document(links(
linkWithRel("self").description("Canonical location of this resource"))));
File defaultSnippetsDir = new File(
"target/generated-snippets/snippet-generation");
assertThat(defaultSnippetsDir).exists();