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

import cz.moneta.test.dataprepare.risk.DefaultLoan;
import cz.moneta.test.dsl.Harness;
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 - Credit Card application")
public class CreditCardApplication extends DefaultLoan {

    @TestCase
    public void newClientWithCreditCardApplication(Harness harness, @Key(banker) Credentials credentials) {
        bankaTasks.newClient().openUfoAndCreateClient(harness, credentials, applicant)
                .then(bankaTasks.cardsOnboarding().creditCards().createNewCreditCardApplication(applicant, LOAN_AMOUNT));
    }
}