package cz.moneta.test.system.wso2;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.data.client.NonClient;
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 CreateCIF {

    @TestCase(name = "Checks if birth number is already in use by the systems")
    public void verifyInOds(Harness harness) {
        boolean exists = harness.tasks().wso2().client().existInOds("9308106489");

        Assertions.assertFalse(exists);
    }

    @TestCase(name = "Create CIF")
    public void createCif(Harness harness) {
        NonClient client = harness.data().newNonClient();
        String cif = harness.tasks().wso2().client().createCifFo(client);

        Assertions.assertEquals(10, cif.length());
    }
}
