ModulusChecking.Steps.Calculators.SecondDoubleAlternateCalculatorExceptionFive.GetWeightSumForStep C# (CSharp) Method

GetWeightSumForStep() protected method

protected GetWeightSumForStep ( BankAccountDetails bankAccountDetails ) : int
bankAccountDetails ModulusChecking.Models.BankAccountDetails
return int
        protected override int GetWeightSumForStep(BankAccountDetails bankAccountDetails)
        {
            if (bankAccountDetails.WeightMappings.Count() != 2)
            {
                throw new ArgumentOutOfRangeException(
                    string.Format("This calculator is for step two but the provided details only have {0} mappings",
                                  bankAccountDetails.WeightMappings.Count()));
            }

            return new DoubleAlternateModulusCheck().GetModulusSum(bankAccountDetails,
                                                                   bankAccountDetails.WeightMappings
                                                                                     .Second());
        }
    }
SecondDoubleAlternateCalculatorExceptionFive