public void HasQualifyingCategoryMeetsExpectation(string candidate)
        {
            // arrange
            var mockDelivery = new Mock <ILearningDelivery>();

            mockDelivery
            .SetupGet(x => x.LearnAimRef)
            .Returns(candidate);

            var handler = new Mock <IValidationErrorHandler>(MockBehavior.Strict);
            var service = new Mock <ILARSDataService>(MockBehavior.Strict);

            service
            .Setup(x => x.GetCategoriesFor(candidate))
            .Returns(Collection.EmptyAndReadOnly <ILARSLearningCategory>());

            var commonChecks = new Mock <IProvideRuleCommonOperations>(MockBehavior.Strict);

            var sut = new LearnAimRef_84Rule(handler.Object, service.Object, commonChecks.Object);

            // act
            var result = sut.HasQualifyingCategory(mockDelivery.Object);

            // assert
            handler.VerifyAll();
            service.VerifyAll();
            commonChecks.VerifyAll();

            Assert.False(result);
        }
        public void HasQualifyingCategoryMeetsExpectation(string candidate)
        {
            var mockDelivery = new Mock <ILearningDelivery>();

            mockDelivery
            .SetupGet(x => x.LearnAimRef)
            .Returns(candidate);

            var handler = new Mock <IValidationErrorHandler>(MockBehavior.Strict);
            var service = new Mock <ILARSDataService>(MockBehavior.Strict);

            service
            .Setup(x => x.GetCategoriesFor(candidate))
            .Returns(new List <ILARSLearningCategory>());

            var learningDeliveryFAMQS = new Mock <ILearningDeliveryFAMQueryService>(MockBehavior.Strict);
            var dd07       = new Mock <IDerivedData_07Rule>(MockBehavior.Strict);
            var dateTimeQS = new Mock <IDateTimeQueryService>(MockBehavior.Strict);

            var sut = new LearnAimRef_84Rule(handler.Object, service.Object, learningDeliveryFAMQS.Object, dd07.Object, dateTimeQS.Object);

            var result = sut.HasQualifyingCategory(mockDelivery.Object);

            handler.VerifyAll();
            service.VerifyAll();
            learningDeliveryFAMQS.VerifyAll();
            dd07.VerifyAll();

            Assert.False(result);
        }