package cz.moneta.test.dataprepare.risk.flexicredit;

import cz.moneta.test.dataprepare.risk.DefaultLoan;
import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.code.lists.HCisAllStavZadosti;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;
import cz.moneta.test.harness.support.auth.Credentials;
import cz.moneta.test.harness.support.auth.Key;

import static cz.moneta.test.dsl.util.credentials.Keys.ufo.banka.banker;

@TestScenario(name = "Test for Risk Retail - Data preparation - client with FlexiCredit application")
public class FlexiCreditApplication extends DefaultLoan {

    @TestCase
    public void newClientWithFlexiCreditApplication(Harness harness, @Key(banker) Credentials credentials) {
        bankaTasks.newClient().openUfoAndCreateClient(harness, credentials, applicant)
                .then(bankaTasks.flexiCreditTasks().createNewFlexiCreditApplication(applicant, LOAN_AMOUNT, HCisAllStavZadosti.APPLICATION_CONDITIONALLY_APROVED));
    }
}