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); }
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); }
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); }
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); }