Merge pull request #10514 from LiamGve/BAEL-4672
BAEL-4672 changed jmeter integration test
This commit is contained in:
commit
d92864efa4
|
@ -15,22 +15,21 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
class JmeterIntegrationTest {
|
class JmeterIntegrationTest {
|
||||||
|
|
||||||
MockMvc mvc;
|
MockMvc mvc;
|
||||||
|
|
||||||
public JmeterIntegrationTest(WebApplicationContext wac) {
|
public JmeterIntegrationTest(WebApplicationContext wac) {
|
||||||
this.mvc = MockMvcBuilders.webAppContextSetup(wac).build();
|
this.mvc = MockMvcBuilders.webAppContextSetup(wac).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void whenCallingUUIDController_thenWeShouldRecieveRandomizedResponse() throws Exception {
|
void whenCallingUUIDController_thenWeShouldRecieveRandomizedResponse() throws Exception {
|
||||||
MockHttpServletResponse response = mvc.perform(get("/api/uuid"))
|
MockHttpServletResponse response = mvc.perform(get("/api/uuid"))
|
||||||
.andDo(print())
|
.andDo(print())
|
||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andReturn()
|
.andReturn()
|
||||||
.getResponse();
|
.getResponse();
|
||||||
|
|
||||||
assertThat(response.getContentAsString())
|
|
||||||
.contains("Test message...");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
assertThat(response.getContentAsString())
|
||||||
|
.contains("Test message...");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue