package cz.moneta.test.regression.cvm.api.callcentrum;


import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;

import static cz.moneta.test.harness.annotations.Environment.PPE;
import static cz.moneta.test.harness.annotations.Environment.TST1;

@TestScenario(name = "Call API GET_TLS_LAST_REQ_CONTACT to WSO2 and assert response parameters")
public class ApiGetTlsLastReqContact {

    @TestCase(name = "Call API GET_TLS_LAST_REQ_CONTACT to WSO2", environments = {TST1, PPE})
    public void postGetTlsLastReqContact(Harness harness) {
        harness.tasks().wso2().restRequest().prepareRequestFromCvm("callcentrum.cluster/GET_TLS_LAST_REQ_CONTACT/001", true,
                "{\n" +
                        "  \"ID_TS_CIS_SUBJEKTY\": 19,\n" +
                        "  \"HODNOTA_SUBJEKT\": \"420775489589\"\n" +
                        "}")
                .post()
                .andAssertStatus(200)
                .andAssertFieldValue("tifResponseStatus.resultCode", "0")
                .andAssertPresent("DATUM_GENEROVANI");
    }
}
