Esempio n. 1
0
        public static ValidationResult IsValid(this Weather weather)
        {
            var validator = new WeatherValidator();

            var result = validator.Validate(weather);

            return(result);
        }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public WeatherValidatorTests()
 {
     _weatherValidator = new WeatherValidator();
 }
 public WeatherValidatorTest()
 {
     this.geometricCalculator = new GeometricCalculator();
     this.weatherValidator    = new WeatherValidator(geometricCalculator);
 }