All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.integrations.check.condition.BodyJsonCondition Maven / Gradle / Ivy

There is a newer version: 2.8
Show newest version
package ru.integrations.check.condition;

import io.restassured.response.Response;
import lombok.RequiredArgsConstructor;
import org.hamcrest.Matcher;

/**
 * Класс для извлечения значения по JsonPath.
 */
@RequiredArgsConstructor
public class BodyJsonCondition implements Condition {
    private final String jsonPath;
    private final Matcher matcher;

    /**
     * Метод излвечения данных из ответа по jsonPath.
     *
     * @param response Запрос.
     */
    @Override
    public void check(Response response) {
        response.then()
                .body(jsonPath, matcher);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy