Example #1
0
        public void CanChooseDblAl()
        {
            var secondModulusCalculatorStep = new SecondModulusCalculatorStep(_secondStepRouter, _nextStep.Object);
            var details = BankDetailsTestMother.BankDetailsWithAlgorithm(ModulusAlgorithm.DblAl);

            secondModulusCalculatorStep.Process(details);

            _standardTen.Verify(st => st.Process(details), Times.Never);
            _standardEleven.Verify(st => st.Process(details), Times.Never);
            _doubleAlternate.Verify(st => st.Process(details), Times.Once);
            _nextStep.Verify(st => st.Process(details), Times.Once);
        }
Example #2
0
        public GatePipeline()
        {
            var secondModulusCalculatorStep = new SecondModulusCalculatorStep(new SecondStepRouter(), new PostProcessModulusCheckResult());
            var exceptionFourteenCalculator = new StandardModulusExceptionFourteenCalculator();

            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);
        }