Beispiel #1
0
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails)
 {
     bankAccountDetails.FirstResult = _firstStepRouter.GetModulusCalculation(bankAccountDetails);
     return(_gates.Process(bankAccountDetails));
 }
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails)
 {
     bankAccountDetails.SecondResult = _secondStepRouter.GetModulusCalculation(bankAccountDetails);
     return(_nextStep.Process(bankAccountDetails));
 }
Beispiel #3
0
 /// <summary>
 /// If there are no SortCode Modulus Weight Mappings available then the BankAccountDetails validate as true.
 /// Otherwise move onto the first modulus calculation step
 /// </summary>
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails) =>
 bankAccountDetails.IsValidForModulusCheck()
         ? _nextStep.Process(bankAccountDetails)
         : new ModulusCheckOutcome("Cannot invalidate these account details as there are no weight mappings for this sort code");
Beispiel #4
0
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails) =>
 bankAccountDetails.IsUncheckableForeignAccount()
         ? new ModulusCheckOutcome("This is an uncheckable foreign account")
     : _firstModulusCalculatorStep.Process(bankAccountDetails);
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails) =>
 bankAccountDetails.IsExceptionTwoAndFirstCheckPassed()
         ? new ModulusCheckOutcome("IsExceptionTwoAndFirstCheckPassed")
         : _nextStep.Process(bankAccountDetails);
Beispiel #6
0
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails) =>
 bankAccountDetails.WeightMappings.Count() == 1
         ? new ModulusCheckOutcome("not proceeding to the second check as there is only one weight mapping", bankAccountDetails.FirstResult)
         : _nextStep.Process(bankAccountDetails);
Beispiel #7
0
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails) =>
 bankAccountDetails.IsSecondCheckRequired()
         ? _nextStep.Process(bankAccountDetails)
         : new ModulusCheckOutcome("first weight mapping exception does not require second check", bankAccountDetails.FirstResult);
Beispiel #8
0
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails) =>
 bankAccountDetails.RequiresCouttsAccountCheck()
         ? ExceptionFourteenForCouttsAccounts(bankAccountDetails)
         : _nextStep.Process(bankAccountDetails);
 public ModulusCheckOutcome Process(BankAccountDetails bankAccountDetails) =>
 bankAccountDetails.IsExceptionThreeAndCanSkipSecondCheck()
         ? new ModulusCheckOutcome("IsExceptionThreeAndCanSkipSecondCheck")
     : _nextStep.Process(bankAccountDetails);