Beispiel #1
0
        public void LearnerEmploymentStatusMonitoringConditionMet_False()
        {
            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOE",
                    ESMCode = 2
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "EII",
                    ESMCode = 3
                }
            };

            var previousEmploymentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "ISB",
                    ESMCode = 6
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LHR",
                    ESMCode = 8
                }
            };

            NewRule().LearnerEmploymentStatusMonitoringConditionMet(
                previousEmploymentStatusMonitorings,
                employmentStatusMonitorings).Should().BeFalse();
        }
Beispiel #2
0
        public void LearnerEmploymentStatusMonitoringConditionMet_True()
        {
            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOE",
                    ESMCode = 2
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "EII",
                    ESMCode = 3
                }
            };

            var previousEmploymentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "loe",
                    ESMCode = 2
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "eii",
                    ESMCode = 3
                }
            };

            NewRule().LearnerEmploymentStatusMonitoringConditionMet(
                previousEmploymentStatusMonitorings,
                employmentStatusMonitorings)
            .Should().BeTrue();
        }
        public void GetDuplicatedEmploymentStatusMonitoringTypesForTypes_MultipleMatches()
        {
            var esmTypes = new[] { "SEI", "eii", "LOU", "LOE", "bsi", "PEI", "sem" };

            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SEI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "EiI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "lOU"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOE"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "BsI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "BSI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "PEI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "Pei"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "sEM"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "Sem"
                },
            };

            NewService().GetDuplicatedEmploymentStatusMonitoringTypesForTypes(employmentStatusMonitorings, esmTypes).Count().Should().Be(3);
        }
        public void HasAnyEmploymentStatusMonitoringTypeMoreThanOnce_FalseNoTypeMatch()
        {
            var esmTypes = new[] { "seI", "EiI", "LOU", "LOE", "BSI", "pEI", "SEM" };

            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "XXX"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "XXX"
                }
            };

            NewService().HasAnyEmploymentStatusMonitoringTypeMoreThanOnce(employmentStatusMonitorings, esmTypes).Should().BeFalse();
        }
        public void GetDuplicatedEmploymentStatusMonitoringTypesForTypes_OneMatch()
        {
            var esmTypes = new[] { "SEI", "eii", "LOU", "LOE", "bSI", "PEI", "sem" };

            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SEI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "EII"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LoU"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOE"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "BsI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "PEI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SEm"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SEm"
                },
            };

            NewService().GetDuplicatedEmploymentStatusMonitoringTypesForTypes(employmentStatusMonitorings, esmTypes).Count().Should().Be(1);
        }
        public void HasAnyEmploymentStatusMonitoringTypeMoreThanOnce_True(string duplicateType)
        {
            var esmTypes = new[] { "SEI", "EII", "LOU", "LOE", "BSI", "PEI", "SEM" };

            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SeI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "EII"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "lou"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOE"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "BSI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "PeI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SEM"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = duplicateType
                }
            };

            NewService().HasAnyEmploymentStatusMonitoringTypeMoreThanOnce(employmentStatusMonitorings, esmTypes).Should().BeTrue();
        }
        public void GetDuplicatedEmploymentStatusMonitoringTypesForTypes_NoMatch()
        {
            var esmTypes = new[] { "seI", "EiI", "LoU", "LOE", "bsi", "PEI", "Sem" };

            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SEI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "EII"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOU"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOE"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "BSI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "pei"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SEM"
                },
            };

            NewService().GetDuplicatedEmploymentStatusMonitoringTypesForTypes(employmentStatusMonitorings, esmTypes).Count().Should().Be(0);
        }
        public void HasAnyEmploymentStatusMonitoringTypeMoreThanOnce_False()
        {
            var esmTypes = new[] { "SEI", "EII", "LOU", "LOE", "BSI", "PEI", "SEM" };

            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "sEI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "EII"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LoU"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOE"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "bsI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "PEI"
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "SEm"
                }
            };

            NewService().HasAnyEmploymentStatusMonitoringTypeMoreThanOnce(employmentStatusMonitorings, esmTypes).Should().BeFalse();
        }
Beispiel #9
0
        public void LearnerEmploymentStatusMonitoringConditionMet_False_DataNullCheck()
        {
            var employmentStatusMonitorings = new TestEmploymentStatusMonitoring[]
            {
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "LOE",
                    ESMCode = 2
                },
                new TestEmploymentStatusMonitoring()
                {
                    ESMType = "EII",
                    ESMCode = 3
                }
            };

            TestEmploymentStatusMonitoring[] previousEmploymentStatusMonitorings = null;

            NewRule().LearnerEmploymentStatusMonitoringConditionMet(
                previousEmploymentStatusMonitorings,
                employmentStatusMonitorings)
            .Should().BeFalse();
        }