From 50ca35bdaef1d6ebe972f98adf6ae15dea065492 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 13 Jun 2016 11:14:12 +0100 Subject: [PATCH] Remove use of deprecated API in REST Docs auto-config test Closes gh-6128 --- ...onfigurationAdvancedConfigurationIntegrationTests.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java index f75b6a645e..08f1d6af0a 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java @@ -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();