package myfeed.user; import static org.hamcrest.Matchers.*; //import static org.springframework.restdocs.RestDocumentation.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.hateoas.MediaTypes; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; /** * @author Spencer Gibb */ @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = UserApp.class) @WebAppConfiguration public class UserDocumentation { /*@Autowired private ObjectMapper objectMapper; @Autowired private WebApplicationContext context; private MockMvc mockMvc;*/ @Before public void setUp() { /*this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context) .apply(documentationConfiguration() .uris() .withHost("user.myfeed.com") .withPort(11070)) .alwaysDo(document("{method-name}/{step}/")) .build();*/ } @Test public void index() throws Exception { /*this.mockMvc.perform(get("/").accept(MediaTypes.HAL_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("_links.users", is(notNullValue())));*/ } }