public AuthenticationResult AuthenticateViaCardAndPin(string cardNumber, string pin) { var cardAuthenticator = new CardAuthenticator(); var authenticationResult = cardAuthenticator.ValidateCardAndPin(cardNumber, pin); return(authenticationResult); }
public ATMManager(BankCard enterredCard, IEnumerable <BankCard> cardRepository) { _cardRepository = cardRepository.ToList(); _authenticator = new CardAuthenticator(cardRepository); IsAuthenticated = _authenticator.Authenticate(enterredCard); }