예제 #1
0
        public void OutTypeConditionMet_False()
        {
            var dpOutcome = new TestDPOutcome
            {
                OutType = null
            };

            NewRule().OutTypeNullConditionMet(dpOutcome).Should().BeFalse();
        }
예제 #2
0
        public void OutTypeConditionMet_True()
        {
            var dpOutcome = new TestDPOutcome
            {
                OutType = "EDU"
            };

            NewRule().OutTypeNullConditionMet(dpOutcome).Should().BeTrue();
        }
        public void OutTypeConditionMet_False(string type)
        {
            var dpOutcome = new TestDPOutcome
            {
                OutType = type
            };

            NewRule().OutTypeConditionMet(dpOutcome).Should().BeFalse();
        }
예제 #4
0
        public void ConditionMet_True(string outType, int outCode)
        {
            var dpOutcome = new TestDPOutcome
            {
                OutType = outType,
                OutCode = outCode
            };

            var lookupsMock = new Mock <IProvideLookupDetails>();

            lookupsMock.Setup(ds => ds.Contains(TypeOfLimitedLifeLookup.OutTypedCode, $"{dpOutcome.OutType}{dpOutcome.OutCode}")).Returns(false);

            NewRule(lookupsMock.Object).ConditionMet(dpOutcome).Should().BeTrue();
        }
예제 #5
0
        public void OutCodeConditionMet_False()
        {
            var dpOutcome = new TestDPOutcome
            {
                OutType = "EDU",
                OutCode = 1
            };

            var lookupsMock = new Mock <IProvideLookupDetails>();

            lookupsMock.Setup(ds => ds.Contains(TypeOfLimitedLifeLookup.OutTypedCode, $"{dpOutcome.OutType}{dpOutcome.OutCode}")).Returns(true);

            NewRule(lookupsMock.Object).OutCodeConditionMet(dpOutcome).Should().BeFalse();
        }
        public void ConditionMet_False()
        {
            var dpOutcome = new TestDPOutcome
            {
                OutType      = "XXX",
                OutCode      = 3,
                OutStartDate = new DateTime(2018, 8, 1)
            };

            var lookupsMock = new Mock <IProvideLookupDetails>();

            lookupsMock.Setup(ds => ds.IsCurrent(TypeOfLimitedLifeLookup.OutType, $"{dpOutcome.OutType}{dpOutcome.OutCode}", dpOutcome.OutStartDate)).Returns(false);

            NewRule(lookupsMock.Object).ConditionMet(dpOutcome).Should().BeFalse();
        }