package cz.moneta.test.system.wso2;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;
import org.junit.jupiter.api.Assertions;

@TestScenario(name = "Checks if birth number is already in use by the systems")
public class CheckBirthNumber {

    @TestCase(name = "Checks if birth number is already in use by the systems")
    public void checkBirthNumber(Harness harness) {
        String response = harness.tasks().wso2().restRequest()
                .prepareEmptyRequestFromCbl("/t/mwf.legacy/HUB/MWF3A3/001")
                .addField("BirthNumber", "7910182929")
                .post()
                .andAssertStatus(200)
                .extract("Allowed")
                .asText();

        Assertions.assertEquals("1", response);
    }

}
