public void ConditionMet_False_NoneGrade() { var learnerFamQueryService = new Mock<ILearnerFAMQueryService>(); learnerFamQueryService.Setup(x => x.HasAnyLearnerFAMCodesForType(It.IsAny<IEnumerable<ILearnerFAM>>(), "MCF", new[] { (long)2 })) .Returns(true); var rule = new MathGrade_03Rule(null, learnerFamQueryService.Object); rule.ConditionMet("NONE", It.IsAny<IReadOnlyCollection<ILearnerFAM>>()).Should().BeFalse(); }
public void ConditionMet_False_FamTypeNotMatching() { var learnerFamQueryService = new Mock<ILearnerFAMQueryService>(); learnerFamQueryService.Setup(x => x.HasAnyLearnerFAMCodesForType(It.IsAny<IEnumerable<ILearnerFAM>>(), It.IsAny<string>(), It.IsAny<IEnumerable<long>>())) .Returns(false); var rule = new MathGrade_03Rule(null, learnerFamQueryService.Object); rule.ConditionMet("ABCC", It.IsAny<IReadOnlyCollection<ILearnerFAM>>()).Should().BeFalse(); }
public void ConditionMet_True(string mathGrade) { var learnerFamQueryService = new Mock <ILearnerFAMQueryService>(); learnerFamQueryService.Setup(x => x.HasLearnerFAMCodeForType(It.IsAny <IEnumerable <ILearnerFAM> >(), It.IsAny <string>(), It.IsAny <long>())) .Returns(false); var rule = new MathGrade_03Rule(null, learnerFamQueryService.Object); rule.ConditionMet(mathGrade, It.IsAny <IReadOnlyCollection <ILearnerFAM> >()).Should().BeTrue(); }
public void ConditionMet_False(string mathGrade) { var learnerFamQueryService = new Mock <ILearnerFAMQueryService>(); learnerFamQueryService.Setup(x => x.HasLearnerFAMCodeForType(It.IsAny <IEnumerable <ILearnerFAM> >(), "EDF", 1)) .Returns(true); var rule = new MathGrade_03Rule(null, learnerFamQueryService.Object); var learnerFams = new[] { new TestLearnerFAM { LearnFAMType = "EDF", LearnFAMCodeNullable = 1 }, new TestLearnerFAM { LearnFAMType = "XYZ", LearnFAMCodeNullable = 2 } }; rule.ConditionMet(mathGrade, learnerFams).Should().BeFalse(); }