예제 #1
0
        public void Init()
        {
            _mockConfigurationSettings = new Mock <IConfigurationSettings>();
            _mockFundingCapCalculator  = new Mock <IFundingCapCalculator>();
            _mockFundingCapCalculator.Setup(x => x.CalculateCurrentFundingBand(It.IsAny <StandardSearchResultsItem>()))
            .Returns(0);
            _mockFundingCapCalculator.Setup(x => x.CalculateCurrentFundingBand(It.IsAny <FrameworkSearchResultsItem>()))
            .Returns(0);
            _activeApprenticeshipChecker = new ActiveApprenticeshipChecker(_mockConfigurationSettings.Object);

            _sut = new FrameworkMapping(_activeApprenticeshipChecker, _mockFundingCapCalculator.Object);
        }
        public void ShouldCheckActiveStandardScenarios(string standardId, DateTime?effectiveFrom, DateTime?effectiveTo, string standardExpiredRequired, bool expectedResult, string message)
        {
            var mockConfigSettings = new Mock <IConfigurationSettings>();

            mockConfigSettings.Setup(x => x.StandardsExpiredRequired).Returns(new List <string> {
                standardExpiredRequired
            });

            var activeFrameworkChecker = new ActiveApprenticeshipChecker(mockConfigSettings.Object);
            var res = activeFrameworkChecker.CheckActiveStandard(standardId, effectiveFrom, effectiveTo);

            Assert.AreEqual(expectedResult, res, message);
        }