public void TestMethod1()
        {
            ILogger logger = new NullLogger();

            IWeatherDataProvider fakeProvider = new FakeWeatherProvider(logger);

            var sollarbattery = new SollarBatteryEstimator(fakeProvider, logger);

            var estimationForWeak = sollarbattery.GetEnergyEstimationForWeak();

            Assert.AreEqual(1570, estimationForWeak);
        }
Example #2
0
            public void DoSomthing()
            {
                var today        = weatherdatapprovider.GetTodaysWeather();
                var weak         = weatherdatapprovider.GetWeaklyWeather();
                var poserestimat = battery.GetEnergyEstimationForWeak();

                logger.Info($"Estimate is: {poserestimat}");

                var d = DateTime.Today;

                logger.Warning($"Today weather is: T max: {today.TemperatureMax}, T min: {today.TemperatureMin}");

                foreach (var data in weak)
                {
                    logger.Error($"{d:d} weather is: T max: {data.TemperatureMax}, T min: {data.TemperatureMin}");
                    d = d.AddDays(1);
                }
            }