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_CAMP_OFFER_DETAILS to WSO2 and assert response parameters")
public class ApiGetTlsCampOfferDetails {

    @TestCase(name = "Call API GET_TLS_CAMP_OFFER_DETAILS to WSO2", environments = {TST1, PPE})
    public void postGetTlsCampOfferDetails(Harness harness) {
        harness.tasks().wso2().restRequest().prepareRequestFromCvm("callcentrum.cluster/GET_TLS_CAMP_OFFER_DETAILS/001", true,
                "{\n" +
                        "  \"ID_TS_HOVORY\": 14664479\n" +
                        "}")
                .post()
                .andAssertStatus(200)
                .andAssertFieldValue("tifResponseStatus.resultCode", "0")
                .andAssertPresent("ID_TS_KAMPANE_KLIENTI")
                .andAssertPresent("ID_TS_KAMPANE")
                .andAssertPresent("POCET_KONTAKTU")
                .andAssertPresent("CELKOVY_POCET_VOLANI");
    }
}
