0
RestAssured를 사용하는 Java 테스트가 있습니다. 많은 테스트에서 given() 및 when() 매개 변수는 다르지만 then() 섹션은 동일하며 여러 assertThat() 문으로 구성됩니다. then() 블록을 계속해서 사용할 수있는 새로운 메서드로 이동하려면 어떻게해야합니까?RestAssured와 함께 일반 assert를 재사용하는 방법
@Test
public void test_inAppMsgEmptyResponse() {
given().
contentType("application/json").
when().
get("inapp/messages.json").
then().assertThat().
statusCode(HttpStatus.SC_OK).
assertThat().
body("pollInterval", equalTo(defaultPollInterval)).
assertThat().
body("notifications", hasSize(0));
}