GetModulusCalculation() public method

public GetModulusCalculation ( BankAccountDetails bankAccountDetails ) : bool
bankAccountDetails ModulusChecking.Models.BankAccountDetails
return bool
Ejemplo n.º 1
0
        public virtual bool Process(BankAccountDetails bankAccountDetails)
        {
            bankAccountDetails.FirstResult = _firstStepRouter.GetModulusCalculation(bankAccountDetails);

            if (bankAccountDetails.RequiresCouttsAccountCheck())
            {
                return(ExceptionFourteenForCouttsAccounts(bankAccountDetails));
            }

            if (bankAccountDetails.WeightMappings.Count() == 1 || !bankAccountDetails.IsSecondCheckRequired())
            {
                return(bankAccountDetails.FirstResult);
            }

            if (bankAccountDetails.IsExceptionTwoAndFirstCheckPassed())
            {
                return(true);
            }

            return(bankAccountDetails.IsExceptionThreeAndCanSkipSecondCheck()
                       ? bankAccountDetails.FirstResult
                       : _secondModulusCalculatorStep.Process(bankAccountDetails));
        }
Ejemplo n.º 2
0
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails)
 {
     bankAccountDetails.FirstResult = _firstStepRouter.GetModulusCalculation(bankAccountDetails);
     return(_gates.Process(bankAccountDetails));
 }