private static async Task <GetPvPowerForecastsResponse> PowerForecastAsync(Location location) { using (var client = new SolcastClient()) { return(await client.GetPvPowerForecastsAsync(location)); } }
public void TestPowerForecast() { var location = Places.Sydney(); Debug.WriteLine(location.Dump()); Task.Run(async() => { using (var client = new SolcastClient()) { var results = await client.GetPvPowerForecastsAsync(location); Assert.NotNull(results); Assert.NotNull(results.Forecasts); Assert.True(results.Forecasts.Count == ForecastDefault.Count); } }).Wait(); }