public void LearnerLearningDeliveryLearningDeliveryFAMUplifter_CleanRunShouldIncrementDates()
        {
            // Arrange
            var ruleProvider            = new RuleProvider();
            var yearUpdateConfiguration = new Mock <IYearUpdateConfiguration>();

            yearUpdateConfiguration.Setup(s => s.ShouldUpdateDate(It.IsAny <string>(), It.IsAny <string>())).Returns(true);

            var learnerLearningDeliveryLearningDeliveryFAMUplifter = new LearnerLearningDeliveryLearningDeliveryFAMUplifter(ruleProvider, yearUpdateConfiguration.Object);

            var messageLearnerLearningDeliveryLearningDeliveryFAM = new MessageLearnerLearningDeliveryLearningDeliveryFAM
            {
                LearnDelFAMDateFrom = new DateTime(2019, 01, 08),
                LearnDelFAMDateTo   = new DateTime(2019, 01, 09)
            };

            // Act
            var result = learnerLearningDeliveryLearningDeliveryFAMUplifter.Process(messageLearnerLearningDeliveryLearningDeliveryFAM);

            // Assert
            yearUpdateConfiguration.Verify(v => v.ShouldUpdateDate("MessageLearnerLearningDeliveryLearningDeliveryFAM", "LearnDelFAMDateFrom"), Times.Once);
            yearUpdateConfiguration.Verify(v => v.ShouldUpdateDate("MessageLearnerLearningDeliveryLearningDeliveryFAM", "LearnDelFAMDateTo"), Times.Once);

            result.Should().NotBeNull();

            result.LearnDelFAMDateFrom.Should().Be(new DateTime(2020, 01, 08));
            result.LearnDelFAMDateTo.Should().Be(new DateTime(2020, 01, 09));
        }
        public bool Evaluate(MessageLearnerLearningDeliveryLearningDeliveryFAM ldFam)
        {
            if (ldFam == null)
            {
                return(false);
            }

            return(ldFam.LearnDelFAMType == _restartFamType && ldFam.LearnDelFAMCode == _restartFamCode);
        }
        public void RestartLearner_FamType_NotRES_Returns_False(MessageLearnerLearningDeliveryLearningDeliveryFAM ldfam, bool expectedResult)
        {
            //arrange


            //act
            var actual = _restatLearnerDelFamRule.Evaluate(ldfam);

            //assert
            Assert.Equal(expectedResult, actual);
        }
 public bool Evaluate(MessageLearnerLearningDeliveryLearningDeliveryFAM ldFam)
 {
     return(ldFam.LearnDelFAMType == _allowedSteelIndRedTrainingFamType &&
            ldFam.LearnDelFAMCode == _allowedSteelIndRedTrainingFamCode);
 }