package cz.moneta.test.dataprepare.risk;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.ufo.banka.pages.cards.credit.HPO019_S001_CreditCardDetailPage;
import cz.moneta.test.dsl.util.data.ClientUtils;
import cz.moneta.test.dsl.util.data.client.NonClient;
import cz.moneta.test.harness.support.util.Level;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;

public class DefaultCreditCard extends DefaultDataPrepare {
    protected final String CARD_ACTIVATED = "Aktivovaná karta";
    protected final int LOAN_AMOUNT = 40000;
    protected NonClient applicant;

    @BeforeEach
    protected void setup(Harness harness) {
        super.setup(harness);
        applicant = ClientUtils.getRiskDefaultClient(harness);
    }

    @AfterEach
    protected void checkAndLogData(Harness harness) {
        Assertions.assertEquals(CARD_ACTIVATED, harness.get(HPO019_S001_CreditCardDetailPage.PROD_STAT_STORE));
        harness.log(Level.INFO, "Client birthnumber: " + applicant.birthNumber());
    }
}