コード例 #1
0
ファイル: WeatherDataTest.cs プロジェクト: hjyao/weather
        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);
        }
コード例 #2
0
ファイル: WeatherData.cs プロジェクト: hjyao/weather
 public WeatherData(CurrentConditionsDisplay currentConditionsDisplay, StatisticsDisplay statisticsDisplay, ForecastDisplay forecastDisplay)
 {
     this.currentConditionsDisplay = currentConditionsDisplay;
     this.statisticsDisplay = statisticsDisplay;
     this.forecastDisplay = forecastDisplay;
 }