Skip to content

Commit

Permalink
Indices tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryershov0 committed Jul 26, 2020
1 parent 2822af0 commit 0bb79ec
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Tests/Indices.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using NUnit.Framework;
using System.Threading.Tasks;

namespace Accuweather.Tests
{
public class Indices
{
private IAccuweatherApi _api;

[SetUp]
public void Init()
{
var apiKey = TestHelper.ApiKey;
var language = TestHelper.Language;
_api = new AccuweatherApi(apiKey, language);
}

[Test]
public async Task FiveDaysOfDailyIndexValues()
{
var resultJson = await _api.Indices.FiveDaysOfDailyIndexValues(178087, true);
TestHelper.StatusCodeIsOk(resultJson);
}

[Test]
public async Task TwelveHoursOfHourlyForecasts()
{
var resultJson =
await _api.Indices.FiveDaysOfDailyIndexValuesByGroupIndex(178087, 50, true);
TestHelper.StatusCodeIsOk(resultJson);
}

[Test]
public async Task FiveDaysOfDailyIndexValuesBySpecificIndex ()
{
var resultJson =
await _api.Indices.FiveDaysOfDailyIndexValuesBySpecificIndex(178087, 087, true);
TestHelper.StatusCodeIsOk(resultJson);
}
}
}

0 comments on commit 0bb79ec

Please sign in to comment.