Example #1
0
        public void GetLatestForecastsAsync_Single_Valid()
        {
            var request = _aviationWeather.GetLatestForecastsAsync(new List <string>()
            {
                "KPHL"
            });

            request.Wait();
            var forecasts = request.Result;

            forecasts.Should().NotBeNull();
            forecasts.Count.Should().Be(1);
            forecasts[0].TAF.Count.Should().BeGreaterOrEqualTo(1);
            forecasts[0].TAF[0].RawTAF.Should().NotBeNullOrWhiteSpace();
            forecasts[0].ICAO.Should().NotBeNullOrWhiteSpace();
        }
        public void GetLatestForecastsAsync_Multiple_Valid()
        {
            var request = _aviationWeather.GetLatestForecastsAsync(new List <string>()
            {
                "WALL", "ZBAA", "EGLL", "HECA"
            });

            request.Wait();
            var forecasts = request.Result;

            forecasts.Should().NotBeNull();
            forecasts.Count.Should().Be(4);
            foreach (var fcst in forecasts)
            {
                fcst.TAF.Count.Should().BeGreaterOrEqualTo(1);
                fcst.TAF[0].RawTAF.Should().NotBeNullOrWhiteSpace();
                fcst.ICAO.Should().NotBeNullOrWhiteSpace();
            }
        }