Esempio n. 1
0
        public void ItCanExplainThatThereWasOnlyOneMapping()
        {
            _bankAccountDetails.WeightMappings = new[]
            {
                BankDetailsTestMother.AnyModulusWeightMapping()
            };

            var modulusCheckOutcome = _onlyOneWeightMappingGate.Process(_bankAccountDetails);

            Assert.AreEqual("not proceeding to the second check as there is only one weight mapping", modulusCheckOutcome.Explanation);
        }
Esempio n. 2
0
        public void IfThereIsOnlyOneMappingItReturns()
        {
            _bankAccountDetails.WeightMappings = new[]
            {
                BankDetailsTestMother.AnyModulusWeightMapping()
            };

            _onlyOneWeightMappingGate.Process(_bankAccountDetails);

            _nextStep.Verify(ns => ns.Process(It.IsAny <BankAccountDetails>()), Times.Never);
        }
Esempio n. 3
0
        public void IfThereAreTwoMappingsItCallsTheNextStep()
        {
            _bankAccountDetails.WeightMappings = new[]
            {
                BankDetailsTestMother.AnyModulusWeightMapping(),
                    BankDetailsTestMother.AnyModulusWeightMapping()
            };

            _onlyOneWeightMappingGate.Process(_bankAccountDetails);

            _nextStep.Verify(ns => ns.Process(_bankAccountDetails), Times.Once);
        }