-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOther.cs
66 lines (65 loc) · 1.86 KB
/
Other.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
54
55
56
57
58
59
60
61
62
63
64
65
66
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Text;
using static AzurAPINetTests.Static;
using Jan0660.AzurAPINet.Enums;
namespace AzurAPINetTests
{
[TestClass]
public class Other
{
[TestMethod]
public void getAllShipsFromFaction()
{
List<string> nationalities = new List<string>();
foreach(var ship in Client.getAllShips())
{
if(!nationalities.Contains(ship.Nationality))
nationalities.Add(ship.Nationality);
}
foreach (var nat in nationalities)
{
var ls = Client.getAllShipsFromFaction(nat);
if (ls.Count == 0)
throw new Exception();
}
}
[TestMethod]
public void getAllShipsFromFactionByEnum()
{
foreach(var val in (Nationality[])Enum.GetValues(typeof(Nationality)))
{
if(val == Nationality.None) continue;
var ls = Client.getAllShipsFromFaction(val);
if (ls.Count == 0)
throw new Exception();
}
}
[TestMethod]
public void getAllShipsByEnglishName()
{
Client.getAllShipsByEnglishName();
}
[TestMethod]
public void getAllShipsByJapaneseName()
{
Client.getAllShipsByJapaneseName();
}
[TestMethod]
public void getAllShipsByChineseName()
{
Client.getAllShipsByChineseName();
}
[TestMethod]
public void getAllShipsByKoreanName()
{
Client.getAllShipsByKoreanName();
}
[TestMethod]
public void getAllShipsByOfficialName()
{
Client.getAllShipsByOfficialName();
}
}
}