Merge pull request #10514 from LiamGve/BAEL-4672

BAEL-4672 changed jmeter integration test
This commit is contained in:
bfontana 2021-02-23 19:36:26 -03:00 committed by GitHub
commit d92864efa4
1 changed files with 14 additions and 15 deletions

View File

@ -15,22 +15,21 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@SpringBootTest
class JmeterIntegrationTest {
MockMvc mvc;
MockMvc mvc;
public JmeterIntegrationTest(WebApplicationContext wac) {
this.mvc = MockMvcBuilders.webAppContextSetup(wac).build();
}
public JmeterIntegrationTest(WebApplicationContext wac) {
this.mvc = MockMvcBuilders.webAppContextSetup(wac).build();
}
@Test
void whenCallingUUIDController_thenWeShouldRecieveRandomizedResponse() throws Exception {
MockHttpServletResponse response = mvc.perform(get("/api/uuid"))
.andDo(print())
.andExpect(status().isOk())
.andReturn()
.getResponse();
assertThat(response.getContentAsString())
.contains("Test message...");
}
@Test
void whenCallingUUIDController_thenWeShouldRecieveRandomizedResponse() throws Exception {
MockHttpServletResponse response = mvc.perform(get("/api/uuid"))
.andDo(print())
.andExpect(status().isOk())
.andReturn()
.getResponse();
assertThat(response.getContentAsString())
.contains("Test message...");
}
}