Ejemplo n.º 1
0
        public FirstStepRouter(SortCodeSubstitution sortCodeSubstitution)
        {
            _firstStandardModulusTenCalculator = new FirstStandardModulusTenCalculator();
            var firstStandardModulusElevenCalculatorExceptionFive = new FirstStandardModulusElevenCalculatorExceptionFive(sortCodeSubstitution);

            _firstStandardModulusElevenCalculator = new FirstStandardModulusElevenCalculator(firstStandardModulusElevenCalculatorExceptionFive);
            _doubleAlternateCalculator            = new FirstDoubleAlternateCalculator(new FirstDoubleAlternateCalculatorExceptionFive());
            InitialiseRoutingDictionary();
        }
Ejemplo n.º 2
0
        public GatePipeline(SortCodeSubstitution sortCodeSubstitution)
        {
            var secondModulusCalculatorStep = new SecondModulusCalculatorStep(new SecondStepRouter(), new PostProcessModulusCheckResult());
            var firstStandardModulusElevenCalculatorExceptionFive = new FirstStandardModulusElevenCalculatorExceptionFive(sortCodeSubstitution);
            var exceptionFourteenCalculator = new StandardModulusExceptionFourteenCalculator(firstStandardModulusElevenCalculatorExceptionFive);

            var isExceptionThreeAndCanSkipSecondCheck = new IsExceptionThreeAndCanSkipSecondCheck(secondModulusCalculatorStep);
            var isExceptionTwoAndFirstCheckPassedGate = new IsExceptionTwoAndFirstCheckPassedGate(isExceptionThreeAndCanSkipSecondCheck);
            var isSecondCheckRequiredGate             = new IsSecondCheckRequiredGate(isExceptionTwoAndFirstCheckPassedGate);
            var onlyOneWeightMappingGate = new OnlyOneWeightMappingGate(isSecondCheckRequiredGate);

            _exceptionFourteenGate = new ExceptionFourteenGate(exceptionFourteenCalculator, onlyOneWeightMappingGate);
        }
 public FirstStandardModulusElevenCalculatorExceptionFive(SortCodeSubstitution sortCodeSubstitution)
 {
     _sortCodeSubstitution = sortCodeSubstitution;
     Modulus = 11;
 }
Ejemplo n.º 4
0
 public IsUncheckableForeignAccount(SortCodeSubstitution sortCodeSubstitution)
 {
     _firstModulusCalculatorStep = new FirstModulusCalculatorStep(sortCodeSubstitution);
 }
Ejemplo n.º 5
0
 public HasWeightMappings(SortCodeSubstitution sortCodeSubstitution)
 {
     _nextStep = new IsUncheckableForeignAccount(sortCodeSubstitution);
 }
 public FirstModulusCalculatorStep(SortCodeSubstitution sortCodeSubstitution)
 {
     _firstStepRouter = new FirstStepRouter(sortCodeSubstitution);
     _gates           = new Gates.GatePipeline(sortCodeSubstitution);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// allows provision of the contents of an arbitrary pair of valacdos files
 /// there is no validation of these files
 /// </summary>
 public ModulusChecker(string weightMappingFileContents, string scsubtabFileContents)
 {
     _weightTable          = new ModulusWeightTable(weightMappingFileContents);
     _sortCodeSubstitution = new SortCodeSubstitution(scsubtabFileContents);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// uses whichever version of the valacdos files were included at build time
 /// </summary>
 public ModulusChecker()
 {
     _weightTable          = new ModulusWeightTable(Resources.valacdos);
     _sortCodeSubstitution = new SortCodeSubstitution(Resources.scsubtab);
 }