Created
December 27, 2016 22:55
-
-
Save upkarlidder/0aed88978f57f8f36606f8ab834944b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void getAllBooksShouldReturnListOfAllBooks() throws Exception { | |
| final String expectedTitle = "The Lightning Thief"; | |
| mockMvc.perform(get(baseUrl + getAllBooksURL) | |
| .accept(MediaType.APPLICATION_JSON)) | |
| .andExpect(status().isOk()) | |
| .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) | |
| .andExpect(jsonPath("$", hasSize(5))) | |
| .andExpect(jsonPath("$[0].title", is(expectedTitle))); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment