Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }