public void GivenTheWeatherIs(WeatherType weather) { dressed = new List <string>(); Console.WriteLine(dressed.ToArray()); switch (weather) { case WeatherType.HOT: _rulesEngine.ClearRules(); _hotWeatherRules = new HotWeatherRules(_rulesEngine); _hotWeatherRules.ConfigureRules(); _weatherType = new HotWeatherDressing(_writerMock, _dressValidator); break; case WeatherType.COLD: _rulesEngine.ClearRules(); _coldWeatherRules = new ColdWeatherRules(_rulesEngine); _coldWeatherRules.ConfigureRules(); _weatherType = new ColdWeatherDressing(_writerMock, _dressValidator); break; default: _weatherType = null; break; } ScenarioContext.Current.Add("WeatherType", _weatherType); }
public HotWeatherRulesTests() { _ruleEngine = new RulesEngine(); _weatherRules = new HotWeatherRules(_ruleEngine); _weatherRules.ConfigureRules(); }