jeudi 10 septembre 2020

MockMVC always Null

MockMvc is always null! i also tried other annotations like it is described at other questions but nothing works.

@ExtendWith(SpringExtension.class)
@WebMvcTest(controllers = HelpPageController.class)
public class HelpPageControllerTest {

    @Autowired
    private MockMvc mockMvc;

    @Test
    public void test() throws Exception {
        
        //other code
 
        ResultActions result = mockMvc.perform(MockMvcRequestBuilders.get("/help/manuals"));

       //other code

    }

Aucun commentaire:

Enregistrer un commentaire