Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Jan 1, 2024
1 parent 26a7f5e commit 929a96a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OpenWeatherMap.Cache.Tests/Tests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Extensions.Configuration;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -14,6 +15,11 @@ public Tests()
{
var config = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build();
_apiKey = config["apiKey"];

if (string.IsNullOrWhiteSpace(_apiKey) || _apiKey == "[API Key]")
{
throw new Exception("OpenWeather API key not successfully set.");
}
}

[Fact]
Expand Down

0 comments on commit 929a96a

Please sign in to comment.