I have configured as follows my rest docs with Junit4 ,with spring boot 1.4
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
@WebAppConfiguration
@ActiveProfiles(SPRING_PROFILE_ACTIVE_TEST)
public class CustomerDetailsControllerWACTest {
@Autowired
private WebApplicationContext wac;
@Rule
public final JUnitRestDocumentation documentation =
new JUnitRestDocumentation("build/generated-snippets");
private RestDocumentationResultHandler document;
MockMvc mockMvc;
@Before
public void setUp() throws Exception
{
this.document = document("{method-name}", preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint()));
this.mockMvc = MockMvcBuilders.webAppContextSetup(wac).
apply(documentationConfiguration(this.documentation))
.alwaysDo(this.document)
.build();
}
But the error is The method documentationConfiguration(RestDocumentation) in the type MockMvcRestDocumentation is not applicable for the arguments (JUnitRestDocumentation)
The documentation also has same configuration as mentioned here.But still it is showing above error.
RestDocs Dependancies(version): spring-restdocs-core-1.1.1 and spring-restdocs-mockmvc-1.0.1