ModulusChecking.Models.BankAccountDetails.IsExceptionTwoAndFirstCheckPassed C# (CSharp) Method

IsExceptionTwoAndFirstCheckPassed() public method

public IsExceptionTwoAndFirstCheckPassed ( ) : bool
return bool
        public bool IsExceptionTwoAndFirstCheckPassed()
        {
            return FirstResult && WeightMappings.First().Exception == 2;
        }

Usage Example

        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);
        }