Beispiel #1
0
        static void Main(string[] args)
        {
            WeatherData weatherData = new WeatherData();
            CurrentConditionsDisplay currentConditionsDisplay = new CurrentConditionsDisplay(weatherData);

            weatherData.setMeasurements(80, 60, 30.4f);
            weatherData.setMeasurements(50, 20, 20.4f);
            Console.ReadLine();
        }
Beispiel #2
0
        public void should_update_panel_of_current_condition()
        {
            var currentConditionsDisplay = new CurrentConditionsDisplay();
            var currentTime = new DateTime();
            var weatherData = new WeatherData(currentConditionsDisplay, new StatisticsDisplay(), new ForecastDisplay());
            weatherData.MeasurementsChanged(currentTime);

            Assert.Equal(currentTime, currentConditionsDisplay.UpdatedTime);
        }
Beispiel #3
0
 public WeatherData(CurrentConditionsDisplay currentConditionsDisplay, StatisticsDisplay statisticsDisplay, ForecastDisplay forecastDisplay)
 {
     this.currentConditionsDisplay = currentConditionsDisplay;
     this.statisticsDisplay = statisticsDisplay;
     this.forecastDisplay = forecastDisplay;
 }