public void LearnAimRef03PassesNoLearnAimRef() { var suppData = new SupplementaryDataModel { LearnAimRef = null, DeliverableCode = "foo" }; var refDataServiceMock = new Mock <IReferenceDataService>(); var rule = new LearnAimRef03(_messageServiceMock.Object, refDataServiceMock.Object); Assert.True(rule.IsValid(suppData)); }
public void LearnAimRef03PassesLearnAimRefFoundInLars() { var suppData = new SupplementaryDataModel { LearnAimRef = "Foo", DeliverableCode = "Foo" }; var refDataServiceMock = new Mock <IReferenceDataService>(); refDataServiceMock .Setup(m => m.GetLarsLearningDelivery(suppData.LearnAimRef)) .Returns(new LarsLearningDeliveryModel()); var rule = new LearnAimRef03(_messageServiceMock.Object, refDataServiceMock.Object); Assert.True(rule.IsValid(suppData)); }