public Car CreateCar(Car car)
 {
     if (_carValidator != null)
     {
         _carValidator.ValidateCar(car, false);
     }
     return(_carRepository.CreateCar(car));
 }
        public void CarIsNull_ExpectArgumentException(bool isUpdate)
        {
            car = null;

            var ex = Assert.Throws <ArgumentException>(() =>
            {
                validator.ValidateCar(car, isUpdate);
            });

            Assert.Equal("Car to validate is missing", ex.Message);
            Assert.Null(car);
        }