public bool IsSecondCheckRequired()
{
if (FirstResult)
{
return !(WeightMappings.Count() == 1 ||
new List<int> {2, 9, 10, 11, 12, 13, 14}.Contains(WeightMappings.First().Exception));
}
return new List<int> {2, 9, 10, 11, 12, 13, 14}.Contains(WeightMappings.First().Exception);
}
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); }