public void should_update_panel_of_statistics() { var currentTime = new DateTime(); var statisticsDisplay = new StatisticsDisplay(); var weatherData = new WeatherData(new CurrentConditionsDisplay(), statisticsDisplay, new ForecastDisplay()); weatherData.MeasurementsChanged(currentTime); Assert.Equal(currentTime, statisticsDisplay.UpdatedTime); }
public WeatherData(CurrentConditionsDisplay currentConditionsDisplay, StatisticsDisplay statisticsDisplay, ForecastDisplay forecastDisplay) { this.currentConditionsDisplay = currentConditionsDisplay; this.statisticsDisplay = statisticsDisplay; this.forecastDisplay = forecastDisplay; }