-
Notifications
You must be signed in to change notification settings - Fork 0
/
CurrentConditions.cs
50 lines (44 loc) · 1023 Bytes
/
CurrentConditions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using NUnit.Framework;
using System.Threading.Tasks;
namespace Accuweather.Tests
{
public class CurrentConditions
{
private IAccuweatherApi _api;
[SetUp]
public void Init()
{
var apiKey = TestHelper.ApiKey;
var language = TestHelper.Language;
_api = new AccuweatherApi(apiKey, language);
}
[Test]
public async Task GetTopCities()
{
var resultJson = await _api.CurrentConditions
.GetTopCities(50);
TestHelper.StatusCodeIsOk(resultJson);
}
[Test]
public async Task Get()
{
var resultJson =
await _api.CurrentConditions.Get(178087, true);
TestHelper.StatusCodeIsOk(resultJson);
}
[Test]
public async Task GetHistorical24Hours()
{
var resultJson =
await _api.CurrentConditions.GetHistorical24Hours(178087, true);
TestHelper.StatusCodeIsOk(resultJson);
}
[Test]
public async Task GetHistorical6Hours()
{
var resultJson =
await _api.CurrentConditions.GetHistorical6Hours(178087, true);
TestHelper.StatusCodeIsOk(resultJson);
}
}
}