Created
June 1, 2019 05:07
-
-
Save donchan922/de1b9255c63e8a8d0d35022d542300f6 to your computer and use it in GitHub Desktop.
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 GETでアクセスする() throws Exception { | |
// GETで「/」にアクセスする | |
mockMvc.perform(MockMvcRequestBuilders.get("/")) | |
// レスポンスのステータスコードが200であることを検証する | |
.andExpect(status().isOk()) | |
// レスポンスボディが「Hello World」であることを検証する | |
.andExpect(content().string("Hello World")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment