Last active
October 21, 2022 18:10
-
-
Save roshanadh/9bfe40594ca273d3bd2be0f545d5da3a to your computer and use it in GitHub Desktop.
Testing GET /batteries
This file contains 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 | |
void shouldReturnAllBatteries() throws Exception { | |
mockMvc | |
.perform(get("/batteries/")) | |
.andDo(print()) | |
.andExpect(status().isOk()) | |
.andExpect(jsonPath("$").isArray()) | |
.andExpect(jsonPath("$", Matchers.hasSize(H2Bootstrap.mockBatteries.size()))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment