public static ValidationResult IsValid(this Weather weather) { var validator = new WeatherValidator(); var result = validator.Validate(weather); return(result); }
public WeatherMachine(GeometricCalculator geometricCalculator, WeatherValidator weatherValidator) { this.geometricCalculator = geometricCalculator; this.weatherValidator = weatherValidator; OccurrencesByWeather.Add(WeatherType.Drought, 0); OccurrencesByWeather.Add(WeatherType.Rainy, 0); OccurrencesByWeather.Add(WeatherType.IdealConditions, 0); OccurrencesByWeather.Add(WeatherType.NotDefined, 0); }
public WeatherValidatorTests() { _weatherValidator = new WeatherValidator(); }
public WeatherValidatorTest() { this.geometricCalculator = new GeometricCalculator(); this.weatherValidator = new WeatherValidator(geometricCalculator); }