public void ValidVehicleCountValidator() { _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(Modules.LeadEntity.Interface.Constants.PropertyKeys.VehicleCountKey, 5) }; var vehicleCountValidator = new VehicleCountValidator(); var actualValue = vehicleCountValidator.ValidLead(_testLeadEntity); bool expectedValue = true; Assert.AreEqual(expectedValue, actualValue); }
public void InvalidVehicleCountValidatorKey() { _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(null, true) }; var vehicleCountValidator = new VehicleCountValidator(); var actualValue = vehicleCountValidator.ValidLead(_testLeadEntity); bool expectedValue = false; Assert.AreEqual(expectedValue, actualValue); }
public void VehicleCountValidator() { var validator = _serviceProvider.GetService <IValidator>(); _testLeadEntity.Properties = new IProperty[] { new DefaultProperty(Modules.LeadEntity.Interface.Constants.PropertyKeys.VehicleCountKey, 1) }; var vehicleCount = new VehicleCountValidator(); vehicleCount.ValidLead(_testLeadEntity); bool expectedValue = false; var actualValue = validator.ValidLead(_testLeadEntity); Assert.AreEqual(expectedValue, actualValue); }