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


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

    @TestCase(name = "Call API GET_CARD_DATA to WSO2", environments = {TST1, PPE})
    public void postGetCardData(Harness harness) {
        harness.tasks().wso2().restRequest().prepareRequestFromCvm("data.cluster/GET_CARD_DATA/001", true,
                "{\n" +
                        "    \"RS_7\": [\n" +
                        "        {\n" +
                        "            \"CARD_NUM_IN\": \"0004243360100039277\"\n" +
                        "        }\n" +
                        "    ]\n" +
                        "}")
                .post()
                .andAssertStatus(200)
                .andAssertPresent("RS_3")
                .andAssertPresent("RS_8");
    }
}
