Esempio n. 1
0
 public bool IsValid(Realty realty)
 {
     if (!_dateValidator.IsValid(realty.RealtyConstructionDate))
     {
         return(false);
     }
     if (!_numberValidator.IsPositive(realty.RealtyMarketValue.ToString()) && !_numberValidator.IsPositive(realty.RealtySaleValue.ToString()))
     {
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
 public bool IsValid(Vehicle vehicle)
 {
     if (!_dateValidator.IsValid(vehicle.VehicleManufactoringYear) && !_dateValidator.IsValid(vehicle.VehicleModelYear))
     {
         return(false);
     }
     if (!_numberValidator.IsPositive(vehicle.VehicleCurrentFipeValue.ToString()) && !_numberValidator.IsPositive(vehicle.VehicleCurrentMileage.ToString()))
     {
         return(false);
     }
     return(true);
 }
 public bool IsValid(MobileDevice mobileDevice)
 {
     if (!_dateValidator.IsValid(mobileDevice.MobileDeviceManufactoringYear))
     {
         return(false);
     }
     if (!_numberValidator.IsPositive(mobileDevice.MobileDeviceInvoiceValue.ToString()))
     {
         return(false);
     }
     return(true);
 }