示例#1
0
        public void InvalidPNIBirthDateValidatorKey()
        {
            _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(null, true) };
            var pniBirthDateValidator = new PNIBirthDateValidator();

            var actualValue = pniBirthDateValidator.ValidLead(_testLeadEntity);

            bool expectedValue = false;

            Assert.AreEqual(expectedValue, actualValue);
        }
示例#2
0
        public void ValidPNIBirthDateValidator()
        {
            _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(Modules.LeadEntity.Interface.Constants.PropertyKeys.PNI_Age, 35) };
            var pniBirthDateValidator = new PNIBirthDateValidator();

            var actualValue = pniBirthDateValidator.ValidLead(_testLeadEntity);

            bool expectedValue = true;

            Assert.AreEqual(expectedValue, actualValue);
        }
示例#3
0
        public void PNIBirthDateValidator()
        {
            var validator = _serviceProvider.GetService <IValidator>();

            _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(Modules.LeadEntity.Interface.Constants.PropertyKeys.PNI_Age, 32) };
            var pniAge = new PNIBirthDateValidator();

            pniAge.ValidLead(_testLeadEntity);

            bool expectedValue = false;

            var actualValue = validator.ValidLead(_testLeadEntity);

            Assert.AreEqual(expectedValue, actualValue);
        }