forked from BenFradet/RiotSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStatusRiotApiTest.cs
53 lines (44 loc) · 1.46 KB
/
StatusRiotApiTest.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
51
52
53
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RiotSharp;
using System.Linq;
namespace RiotSharpTest
{
[TestClass]
public class StatusRiotApiTest
{
private static StatusRiotApi api = StatusRiotApi.GetInstance();
private static Region region = Region.euw;
[TestMethod]
[TestCategory("StatusRiotApi")]
public void GetShards_Test()
{
var shards = api.GetShards();
Assert.IsNotNull(shards);
Assert.IsTrue(shards.Count() > 0);
}
[TestMethod]
[TestCategory("StatusRiotApi"), TestCategory("Async")]
public void GetShardsAsync_Test()
{
var shards = api.GetShardsAsync();
Assert.IsNotNull(shards.Result);
Assert.IsTrue(shards.Result.Count() > 0);
}
[TestMethod]
[TestCategory("StatusRiotApi")]
public void GetShardStatus_Test()
{
var shardStatus = api.GetShardStatus(region);
Assert.IsNotNull(shardStatus);
Assert.AreEqual(region.ToString(), shardStatus.Slug.ToString());
}
[TestMethod]
[TestCategory("StatusRiotApi"), TestCategory("Async")]
public void GetShardStatusAsync_Test()
{
var shardStatus = api.GetShardStatusAsync(region);
Assert.IsNotNull(shardStatus.Result);
Assert.AreEqual(region.ToString(), shardStatus.Result.Slug.ToString());
}
}
}