示例#1
0
        public void ValidPriorBIValidator()
        {
            _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(LeadEntity.Interface.Constants.PropertyKeys.PriorBIKey, "100/300") };
            var priorBIValidator = new PriorBIValidator();

            var actualValue = priorBIValidator.ValidLead(_testLeadEntity);

            bool expectedValue = true;

            Assert.AreEqual(expectedValue, actualValue);
        }
示例#2
0
        public void InvalidPriorBIValidatorKey()
        {
            _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(null, true) };
            var priorBIValidator = new PriorBIValidator();

            var actualValue = priorBIValidator.ValidLead(_testLeadEntity);

            bool expectedValue = false;

            Assert.AreEqual(expectedValue, actualValue);
        }
示例#3
0
        public void NullPriorBIValueValidator()
        {
            _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(Modules.LeadEntity.Interface.Constants.PropertyKeys.PriorBIKey, null) };
            var priorBIValidator = new PriorBIValidator();

            var actualValue = priorBIValidator.ValidLead(_testLeadEntity);

            bool expectedValue = false;

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

            _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(Modules.LeadEntity.Interface.Constants.PropertyKeys.PriorBIKey, "25/50") };
            var priorBI = new PriorBIValidator();

            priorBI.ValidLead(_testLeadEntity);

            bool expectedValue = false;

            var actualValue = validator.ValidLead(_testLeadEntity);

            Assert.AreEqual(expectedValue, actualValue);
        }