本文整理汇总了C#中ModulusChecking.Models.BankAccountDetails类的典型用法代码示例。如果您正苦于以下问题:C# BankAccountDetails类的具体用法?C# BankAccountDetails怎么用?C# BankAccountDetails使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BankAccountDetails类属于ModulusChecking.Models命名空间,在下文中一共展示了BankAccountDetails类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:pauldambra,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateCalculatorTests.cs
示例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);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateModulusCheckTests.cs
示例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);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateModulusCheckTests.cs
示例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);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateModulusCheckTests.cs
示例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);
}
开发者ID:pauldambra,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateCalculatorTests.cs
示例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);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:7,代码来源:MockCalculatorTests.cs
示例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);
}
开发者ID:pauldambra,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateCalculatorTests.cs
示例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);
}
开发者ID:pauldambra,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateCalculatorTests.cs
示例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);
}
开发者ID:pauldambra,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateCalculatorTests.cs
示例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);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:7,代码来源:MockCalculatorTests.cs
示例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);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:7,代码来源:FirstStandardModulusElevenCalculatorTests.cs
示例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));
}
开发者ID:pauldambra,项目名称:ModulusChecker,代码行数:7,代码来源:ConfirmDetailsAreValidForTestingTests.cs
示例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);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateCalculatorTests.cs
示例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);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:7,代码来源:DoubleAlternateModulusCheckTests.cs
示例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;
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:8,代码来源:BaseModulusCalculator.cs
示例16: ExceptionFiveDoubleAlternateWhenBothPass
//938000 938696 Mod11 7 6 5 4 3 2 7 6 5 4 3 2 0 0 5
//938000 938696 DblAl 2 1 2 1 2 1 2 1 2 1 2 1 2 0 5
public void ExceptionFiveDoubleAlternateWhenBothPass()
{
var details = new BankAccountDetails("938063", "55065200");
var mapping = new ModulusWeightMapping("938000 938696 DblAl 2 1 2 1 2 1 2 1 2 1 2 1 2 0 5");
var actual = _check.GetModulusSum(details, mapping);
Assert.AreEqual(40,actual);
Assert.AreEqual(0,actual%10);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:10,代码来源:DoubleAlternateModulusCheckTests.cs
示例17: CanGetSecondAlternativeExceptionTwoValue
public void CanGetSecondAlternativeExceptionTwoValue()
{
var target = new BankAccountDetails("123456", "10000090")
{
WeightMappings = BuildMappingList("123456", 1, 1)
};
Assert.AreEqual(BankAccountDetails.AisNotZeroAndGisNineWeights, target.GetExceptionTwoAlternativeWeights(new int[1]));
}
开发者ID:pauldambra,项目名称:ModulusChecker,代码行数:8,代码来源:BankAccountDetailsTests.cs
示例18: CorrectlySkipsUncheckableForeignAccount
public void CorrectlySkipsUncheckableForeignAccount()
{
var accountDetails = new BankAccountDetails("200915", "41011166");
accountDetails.WeightMappings = _mockModulusWeightTable.Object.GetRuleMappings(accountDetails.SortCode);
_ruleStep.Process(accountDetails);
Assert.IsTrue(accountDetails.FirstResult);
_firstModulusCalculatorStep.Verify(nr => nr.Process(accountDetails), Times.Never());
}
开发者ID:pauldambra,项目名称:ModulusChecker,代码行数:8,代码来源:ConfirmDetailsAreValidForTestingTests.cs
示例19: CanCalculateForExceptionFiveWhereBothChecksPass
public void CanCalculateForExceptionFiveWhereBothChecksPass()
{
var accountDetails = new BankAccountDetails("938063", "55065200");
accountDetails.WeightMappings = ModulusWeightTable.GetInstance.GetRuleMappings(accountDetails.SortCode);
var standardResult = _standardExceptionFiveCalculator.Process(accountDetails);
var doubleResult = _secondDoubleAlternateExceptionFiveCalculator.Process(accountDetails);
Assert.IsTrue(standardResult);
Assert.IsTrue(doubleResult);
}
开发者ID:zopaUK,项目名称:ModulusChecker,代码行数:9,代码来源:ExceptionFiveCalculationTests.cs
示例20: Process
public override bool Process(BankAccountDetails bankAccountDetails)
{
if (!bankAccountDetails.AccountNumber.IsValidCouttsNumber)
{
return false;
}
bankAccountDetails.AccountNumber.SetElementAt(7, '0');
return base.Process(bankAccountDetails);
}
开发者ID:regisbsb,项目名称:ModulusChecker,代码行数:9,代码来源:StandardModulusExceptionFourteenCalculator.cs
注:本文中的ModulusChecking.Models.BankAccountDetails类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论