Exemple #1
0
        private static void Main()
        {
            WeatherReporter weatherReporter = new WeatherReporter();

            CurrentConditions currentConditions = new CurrentConditions(weatherReporter);
            WeatherStatistics weatherStatistics = new WeatherStatistics(weatherReporter);
            WeatherForecast   weatherForecast   = new WeatherForecast(weatherReporter);
            HeatIndex         heatIndex         = new HeatIndex(weatherReporter);

            weatherReporter.SetMeasurements(80, 65, 30.4f);
            weatherReporter.SetMeasurements(82, 70, 29.2f);
            weatherReporter.SetMeasurements(78, 90, 29.2f);

            Console.ReadKey();
        }
 public void TestSetup()
 {
     this.weatherQuery  = new MockWeatherQuery();
     this.uut           = new WeatherReporter(this.weatherQuery);
     this.currentReport = new WeatherReport();
 }
Exemple #3
0
 public void TestSetup()
 {
     this.weatherQuery  = new Mock <IWeatherQuery>(MockBehavior.Strict);
     this.uut           = new WeatherReporter(this.weatherQuery.Object);
     this.currentReport = new WeatherReport();
 }