vendredi 30 octobre 2015

Checking that returns JSON data in mockMVC test

this is my test:

    @Test
    public void testGetRest() throws Exception {
        mockMvc.perform(get("/rest/").accept(MediaType.APPLICATION_JSON))
                .andExpect(status().isOk())      
    }

status().isOK() check REST return 200, but how can I check if the JSON at least one record?

Aucun commentaire:

Enregistrer un commentaire