package cz.moneta.test.dataprepare.ml.hypos;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.hypos.tasks.HyposDbTasks;
import cz.moneta.test.dsl.util.data.account.AccountDetail;
import cz.moneta.test.harness.annotations.Environment;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;

import java.util.Map;

@TestScenario(name = "Create current account")
public class CreateBuAtomPrepare {
    @TestCase(name = "Create current account", environments = {Environment.TST1, Environment.PPE, Environment.FVE})
    public void createCaToHyposClient(Harness harness) {
        Map<String, String> personDetails = new HyposDbTasks(harness).getClientDetailsByPin(harness.getSystemOrConfigValue("yamlData"));

        String clientCurrentAccount = harness.tasks().wso2().client().createAccountAndGetAccountNumber(
                personDetails.get("CIF"),
                personDetails.get("FULL_NAME"),
                new AccountDetail("1201004", "413"),
                "GEBTHRZ");
        harness.log("Number of the newly created current account is: " + clientCurrentAccount);
    }
}