本文整理汇总了C#中ModulusChecking.Models.BankAccountDetails类的典型用法代码示例。如果您正苦于以下问题:C# BankAccountDetails类的具体用法?C# BankAccountDetails怎么用?C# BankAccountDetails使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BankAccountDetails类属于ModulusChecking.Models命名空间,在下文中一共展示了BankAccountDetails类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanProcessVocaLinkDoubleAlternateWithExceptionOne
public void CanProcessVocaLinkDoubleAlternateWithExceptionOne()
{
var accountDetails = new BankAccountDetails("118765", "64371389");
accountDetails.WeightMappings = _fakedModulusWeightTable.Object.GetRuleMappings(accountDetails.SortCode);
var result = _firstStepDblAlCalculator.Process(accountDetails);
Assert.True(result);
}
示例2: CalculatesSumAsExpected
public void CalculatesSumAsExpected()
{
var details = new BankAccountDetails("499273", "12345678");
var mapping = new ModulusWeightMapping("012345 012346 dblal 2 1 2 1 2 1 2 1 2 1 2 1 2 1");
var actual = _check.GetModulusSum(details, mapping);
Assert.AreEqual(70,actual);
}
示例3: ExceptionFiveValidationTestSumCheck
public void ExceptionFiveValidationTestSumCheck()
{
var details = new BankAccountDetails("938611", "07806039");
var mapping = new ModulusWeightMapping("012345 012346 dblal 2 1 2 1 2 1 2 1 2 1 2 1 2 0 5");
var actual = _check.GetModulusSum(details, mapping);
Assert.AreEqual(51, actual);
}
示例4: CalculatesExceptionSixTestCaseCorrectly
public void CalculatesExceptionSixTestCaseCorrectly()
{
var details = new BankAccountDetails("202959", "63748472");
var mapping = new ModulusWeightMapping("012345 012346 dblal 2 1 2 1 2 1 2 1 2 1 2 1 2 1");
var actual = _check.GetModulusSum(details, mapping);
Assert.AreEqual(60,actual);
}
示例5: ExceptionFiveSecondCheckDigitIncorrect
public void ExceptionFiveSecondCheckDigitIncorrect()
{
var accountDetails = new BankAccountDetails("938063", "15764273");
accountDetails.WeightMappings = ModulusWeightTable.GetInstance.GetRuleMappings(accountDetails.SortCode);
var result = _firstStepDblAlCalculator.Process(accountDetails);
Assert.IsFalse(result);
}
示例6: CanProcessVocalinkStandardEleven
public void CanProcessVocalinkStandardEleven()
{
var accountDetails = new BankAccountDetails("107999", "88837491");
accountDetails.WeightMappings = ModulusWeightTable.GetInstance.GetRuleMappings(accountDetails.SortCode);
var result = new FirstStandardModulusElevenCalculator().Process(accountDetails);
Assert.True(result);
}
示例7: ExceptionFiveWhereFirstCheckPasses
public void ExceptionFiveWhereFirstCheckPasses()
{
var accountDetails = new BankAccountDetails("938611", "07806039");
accountDetails.WeightMappings = ModulusWeightTable.GetInstance.GetRuleMappings(accountDetails.SortCode);
var result = _firstStepDblAlCalculator.Process(accountDetails);
Assert.IsFalse(result);
}
示例8: ExceptionSixButNotAForeignAccount
public void ExceptionSixButNotAForeignAccount()
{
var accountDetails = new BankAccountDetails("202959", "63748472");
accountDetails.WeightMappings = ModulusWeightTable.GetInstance.GetRuleMappings(accountDetails.SortCode);
var result = _secondStepDblAlCalculator.Process(accountDetails);
Assert.IsTrue(result);
}
示例9: ExceptionThreeWhereCisNeitherSixNorNine
public void ExceptionThreeWhereCisNeitherSixNorNine()
{
var accountDetails = new BankAccountDetails("827101", "28748352");
accountDetails.WeightMappings = ModulusWeightTable.GetInstance.GetRuleMappings(accountDetails.SortCode);
var result = _secondStepDblAlCalculator.Process(accountDetails);
Assert.IsTrue(result);
}
示例10: CanProcessStandardElevenCheck
public void CanProcessStandardElevenCheck()
{
var accountDetails = new BankAccountDetails("000000", "58177632");
accountDetails.WeightMappings = _fakedModulusWeightTable.Object.GetRuleMappings(accountDetails.SortCode);
var result = new FirstStandardModulusElevenCalculator().Process(accountDetails);
Assert.True(result);
}
示例11: CanPassBasicModulus11Test
public void CanPassBasicModulus11Test()
{
var accountDetails = new BankAccountDetails("202959", "63748472");
accountDetails.WeightMappings = ModulusWeightTable.GetInstance.GetRuleMappings(accountDetails.SortCode);
var result = _calculator.Process(accountDetails);
Assert.IsTrue(result);
}
示例12: KnownSortCodeIsTested
public void KnownSortCodeIsTested(string sc, string an)
{
var accountDetails = new BankAccountDetails(sc, an);
accountDetails.WeightMappings = _mockModulusWeightTable.Object.GetRuleMappings(accountDetails.SortCode);
_ruleStep.Process(accountDetails);
_firstModulusCalculatorStep.Verify(nr => nr.Process(accountDetails));
}
示例13: CanProcessDoubleAlternateCheck
public void CanProcessDoubleAlternateCheck()
{
var accountDetails = new BankAccountDetails("499273", "12345678");
accountDetails.WeightMappings = _fakedModulusWeightTable.Object.GetRuleMappings(accountDetails.SortCode);
var result = _firstStepDblAlCalculator.Process(accountDetails);
Assert.True(result);
}
示例14: ExceptionFiveFirstCheckCorrectSecondIncorrect
public void ExceptionFiveFirstCheckCorrectSecondIncorrect()
{
var details = new BankAccountDetails("938063", "15764273");
var mapping = new ModulusWeightMapping("012345 012346 dblal 2 1 2 1 2 1 2 1 2 1 2 1 2 0 5");
var actual = _check.GetModulusSum(details, mapping);
Assert.AreEqual(58, actual);
}
示例15: ProcessWeightingRule
protected bool ProcessWeightingRule(BankAccountDetails bankAccountDetails, IModulusWeightMapping modulusWeightMapping)
{
var weightingSum = new StandardModulusCheck().GetModulusSum(bankAccountDetails,modulusWeightMapping);
var remainder = weightingSum%Modulus;
return modulusWeightMapping.Exception == 4
? bankAccountDetails.AccountNumber.GetExceptionFourCheckValue == remainder
: remainder == 0;
}