public void TestWeatherAtASite()
        {
            var request = new WeatherData <SiteData>();

            request.Path = new SiteData();
            request.Path.Location.Latitude  = 39.0;
            request.Path.Location.Longitude = -104.77;
            request.Path.Location.Altitude  = 1910;
            request.AnalysisStart           = new DateTime(2019, 4, 22, 12, 0, 0);
            request.AnalysisStop            = new DateTime(2019, 4, 22, 13, 0, 0);

            var weather = WeatherServices.GetWeatherAtASite(request).Result;

            Assert.That(weather != null);
            Assert.That(weather.Count == 3);
        }
Exemple #2
0
        public void TestWeatherAtASite()
        {
            var request = new WeatherData <SiteData>();

            request.Path = new SiteData();
            request.Path.Location.Latitude  = 39.0;
            request.Path.Location.Longitude = -104.77;
            request.Path.Location.Altitude  = 1910;
            request.AnalysisStart           = DateTime.Now.AddDays(-2);
            request.AnalysisStop            = DateTime.Now.AddDays(-2).AddHours(2.5);

            var weather = WeatherServices.GetWeatherAtASite(request).Result;

            Assert.That(weather != null);
            Assert.That(weather.Count == 6);
        }