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


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

    @TestCase(name = "Call API GET_APP_CLIENT_REASONS_016 to WSO2", environments = {TST1, PPE})
    public void postGetAppClientReasons016(Harness harness) {
        harness.tasks().wso2().restRequest().prepareRequestFromCvm("risk.cluster/NAS/GET_APP_CLIENT_REASONS_016/001", true,
                "{\n" +
                        "  \"APP_KEY\": 62572561,\n" +
                        "  \"INST_CUST_ID\": null,\n" +
                        "  \"INST_OBLGTN_KEY\": \"\",\n" +
                        "  \"DECISION_TYPE\": \"\",\n" +
                        "  \"INST_DOC_KEY\": null,\n" +
                        "  \"REASON_ADD_ROLE\": \"\",\n" +
                        "  \"EMP_ROLE\": \"\",\n" +
                        "  \"REASON_TEXT_TYPE\": \"DEF\",\n" +
                        "  \"SCREEN_ID\": \"\",\n" +
                        "  \"FILTER_VALID_ONLY_FLAG\": \"\",\n" +
                        "  \"REASONS_FILTER\": \"\"\n" +
                        "}")
                .post()
                .andAssertStatus(200)
                .andAssertFieldValue("tifResponseStatus.resultCode", "0")
                .andAssertPresent("RS_DATA");
    }
}
