Skip to content

Commit 4ad8e33

Browse files
authored
added details for more countries (#100)
1 parent 1e71482 commit 4ad8e33

31 files changed

Lines changed: 1326 additions & 0 deletions
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MonacoTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Monaco";
6+
private const string OFFICIAL_NAME = "Principality of Monaco";
7+
private const string NATIVE_NAME = "Principauté de Monaco";
8+
private const string CAPITAL = "Monaco";
9+
private const string ISO2_CODE = "MC";
10+
private const string ISO3_CODE = "MCO";
11+
private const int NUMERIC_CODE = 492;
12+
private readonly string[] CALLING_CODE = ["+377"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Monaco;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = [];
16+
17+
[Fact]
18+
public void GetCountry_ReturnsCorrectInformation_ForMonaco()
19+
{
20+
var country = CountryProvider.GetCountry(EXPECTEDID);
21+
22+
AssertCorrectInformation(
23+
country,
24+
EXPECTEDID,
25+
COUNTRY_NAME,
26+
OFFICIAL_NAME,
27+
NATIVE_NAME,
28+
CAPITAL,
29+
NUMERIC_CODE,
30+
ISO2_CODE,
31+
ISO3_CODE,
32+
CALLING_CODE,
33+
EXPECTED_STATES
34+
);
35+
}
36+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+

2+
namespace World.Net.UnitTests.Countries;
3+
4+
public sealed class MongoliaTest : AssertCountryTestBase
5+
{
6+
private const string COUNTRY_NAME = "Mongolia";
7+
private const string OFFICIAL_NAME = "Mongolia";
8+
private const string NATIVE_NAME = "Монгол Улс";
9+
private const string CAPITAL = "Ulaanbaatar";
10+
private const string ISO2_CODE = "MN";
11+
private const string ISO3_CODE = "MNG";
12+
private const int NUMERIC_CODE = 496;
13+
private readonly string[] CALLING_CODE = ["+976"];
14+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Mongolia;
15+
16+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
17+
{
18+
("Arkhangai", "MN-073", "Province"),
19+
("Bayan-Ölgii", "MN-071", "Province"),
20+
("Bayankhongor", "MN-069", "Province"),
21+
("Bulgan", "MN-067", "Province"),
22+
("Darkhan-Uul", "MN-037", "Province"),
23+
("Dornod", "MN-061", "Province"),
24+
("Dornogovi", "MN-063", "Province"),
25+
("Dundgovi", "MN-059", "Province"),
26+
("Govi-Altai", "MN-065", "Province"),
27+
("Govisümber", "MN-064", "Province"),
28+
("Khentii", "MN-039", "Province"),
29+
("Khovd", "MN-043", "Province"),
30+
("Khövsgöl", "MN-041", "Province"),
31+
("Ömnögovi", "MN-053", "Province"),
32+
("Orkhon", "MN-035", "Province"),
33+
("Övörkhangai", "MN-055", "Province"),
34+
("Selenge", "MN-049", "Province"),
35+
("Sükhbaatar", "MN-051", "Province"),
36+
("Töv", "MN-047", "Province"),
37+
("Uvs", "MN-046", "Province"),
38+
("Zavkhan", "MN-057", "Province"),
39+
("Ulaanbaatar", "MN-1", "Municipality")
40+
};
41+
42+
[Fact]
43+
public void GetCountry_ReturnsCorrectInformation_ForMongolia()
44+
{
45+
var country = CountryProvider.GetCountry(EXPECTEDID);
46+
47+
AssertCorrectInformation(
48+
country,
49+
EXPECTEDID,
50+
COUNTRY_NAME,
51+
OFFICIAL_NAME,
52+
NATIVE_NAME,
53+
CAPITAL,
54+
NUMERIC_CODE,
55+
ISO2_CODE,
56+
ISO3_CODE,
57+
CALLING_CODE,
58+
EXPECTED_STATES
59+
);
60+
}
61+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
using System;
2+
namespace World.Net.UnitTests.Countries;
3+
4+
public sealed class MontenegroTest : AssertCountryTestBase
5+
{
6+
private const string COUNTRY_NAME = "Montenegro";
7+
private const string OFFICIAL_NAME = "Montenegro";
8+
private const string NATIVE_NAME = "Crna Gora";
9+
private const string CAPITAL = "Podgorica";
10+
private const string ISO2_CODE = "ME";
11+
private const string ISO3_CODE = "MNE";
12+
private const int NUMERIC_CODE = 499;
13+
private readonly string[] CALLING_CODE = ["+382"];
14+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Montenegro;
15+
16+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
17+
{
18+
("Andrijevica", "ME-01", "Municipality"),
19+
("Bar", "ME-02", "Municipality"),
20+
("Berane", "ME-03", "Municipality"),
21+
("Bijelo Polje", "ME-04", "Municipality"),
22+
("Budva", "ME-05", "Municipality"),
23+
("Cetinje", "ME-06", "Municipality"),
24+
("Danilovgrad", "ME-07", "Municipality"),
25+
("Herceg Novi", "ME-08", "Municipality"),
26+
("Kolašin", "ME-09", "Municipality"),
27+
("Kotor", "ME-10", "Municipality"),
28+
("Mojkovac", "ME-11", "Municipality"),
29+
("Nikšić", "ME-12", "Municipality"),
30+
("Plav", "ME-13", "Municipality"),
31+
("Pljevlja", "ME-14", "Municipality"),
32+
("Plužine", "ME-15", "Municipality"),
33+
("Podgorica", "ME-16", "Municipality"),
34+
("Rožaje", "ME-17", "Municipality"),
35+
("Šavnik", "ME-18", "Municipality"),
36+
("Tivat", "ME-19", "Municipality"),
37+
("Ulcinj", "ME-20", "Municipality"),
38+
("Žabljak", "ME-21", "Municipality")
39+
};
40+
41+
[Fact]
42+
public void GetCountry_ReturnsCorrectInformation_ForMontenegro()
43+
{
44+
var country = CountryProvider.GetCountry(EXPECTEDID);
45+
46+
AssertCorrectInformation(
47+
country,
48+
EXPECTEDID,
49+
COUNTRY_NAME,
50+
OFFICIAL_NAME,
51+
NATIVE_NAME,
52+
CAPITAL,
53+
NUMERIC_CODE,
54+
ISO2_CODE,
55+
ISO3_CODE,
56+
CALLING_CODE,
57+
EXPECTED_STATES
58+
);
59+
}
60+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MontserratTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Montserrat";
6+
private const string OFFICIAL_NAME = "Montserrat";
7+
private const string NATIVE_NAME = "Montserrat";
8+
private const string CAPITAL = "Plymouth";
9+
private const string ISO2_CODE = "MS";
10+
private const string ISO3_CODE = "MSR";
11+
private const int NUMERIC_CODE = 500;
12+
private readonly string[] CALLING_CODE = ["+1-664"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Montserrat;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = [];
16+
17+
[Fact]
18+
public void GetCountry_ReturnsCorrectInformation_ForMontserrat()
19+
{
20+
var country = CountryProvider.GetCountry(EXPECTEDID);
21+
22+
AssertCorrectInformation(
23+
country,
24+
EXPECTEDID,
25+
COUNTRY_NAME,
26+
OFFICIAL_NAME,
27+
NATIVE_NAME,
28+
CAPITAL,
29+
NUMERIC_CODE,
30+
ISO2_CODE,
31+
ISO3_CODE,
32+
CALLING_CODE,
33+
EXPECTED_STATES
34+
);
35+
}
36+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MoroccoTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Morocco";
6+
private const string OFFICIAL_NAME = "Kingdom of Morocco";
7+
private const string NATIVE_NAME = "المغرب";
8+
private const string CAPITAL = "Rabat";
9+
private const string ISO2_CODE = "MA";
10+
private const string ISO3_CODE = "MAR";
11+
private const int NUMERIC_CODE = 504;
12+
private readonly string[] CALLING_CODE = ["+212"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Morocco;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Tanger-Tetouan-Al Hoceima", "MA-01", "Region"),
18+
("Oriental", "MA-02", "Region"),
19+
("Fes-Meknes", "MA-03", "Region"),
20+
("Rabat-Sale-Kenitra", "MA-04", "Region"),
21+
("Beni Mellal-Khenifra", "MA-05", "Region"),
22+
("Casablanca-Settat", "MA-06", "Region"),
23+
("Marrakesh-Safi", "MA-07", "Region"),
24+
("Draa-Tafilalet", "MA-08", "Region"),
25+
("Souss-Massa", "MA-09", "Region"),
26+
("Guelmim-Oued Noun", "MA-10", "Region"),
27+
("Laayoune-Sakia El Hamra", "MA-11", "Region"),
28+
("Dakhla-Oued Ed-Dahab", "MA-12", "Region")
29+
};
30+
31+
[Fact]
32+
public void GetCountry_ReturnsCorrectInformation_ForMorocco()
33+
{
34+
var country = CountryProvider.GetCountry(EXPECTEDID);
35+
36+
AssertCorrectInformation(
37+
country,
38+
EXPECTEDID,
39+
COUNTRY_NAME,
40+
OFFICIAL_NAME,
41+
NATIVE_NAME,
42+
CAPITAL,
43+
NUMERIC_CODE,
44+
ISO2_CODE,
45+
ISO3_CODE,
46+
CALLING_CODE,
47+
EXPECTED_STATES
48+
);
49+
}
50+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MozambiqueTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Mozambique";
6+
private const string OFFICIAL_NAME = "Republic of Mozambique";
7+
private const string NATIVE_NAME = "Moçambique";
8+
private const string CAPITAL = "Maputo";
9+
private const string ISO2_CODE = "MZ";
10+
private const string ISO3_CODE = "MOZ";
11+
private const int NUMERIC_CODE = 508;
12+
private readonly string[] CALLING_CODE = ["+258"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Mozambique;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Cabo Delgado", "MZ-P", "Province"),
18+
("Gaza", "MZ-G", "Province"),
19+
("Inhambane", "MZ-I", "Province"),
20+
("Manica", "MZ-B", "Province"),
21+
("Maputo Province", "MZ-L", "Province"),
22+
("Maputo City", "MZ-MPM", "City"),
23+
("Nampula", "MZ-N", "Province"),
24+
("Niassa", "MZ-A", "Province"),
25+
("Sofala", "MZ-S", "Province"),
26+
("Tete", "MZ-T", "Province"),
27+
("Zambezia", "MZ-Q", "Province")
28+
};
29+
30+
[Fact]
31+
public void GetCountry_ReturnsCorrectInformation_ForMozambique()
32+
{
33+
var country = CountryProvider.GetCountry(EXPECTEDID);
34+
35+
AssertCorrectInformation(
36+
country,
37+
EXPECTEDID,
38+
COUNTRY_NAME,
39+
OFFICIAL_NAME,
40+
NATIVE_NAME,
41+
CAPITAL,
42+
NUMERIC_CODE,
43+
ISO2_CODE,
44+
ISO3_CODE,
45+
CALLING_CODE,
46+
EXPECTED_STATES
47+
);
48+
}
49+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MyanmarTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Myanmar";
6+
private const string OFFICIAL_NAME = "Republic of the Union of Myanmar";
7+
private const string NATIVE_NAME = "မြန်မာ";
8+
private const string CAPITAL = "Naypyidaw";
9+
private const string ISO2_CODE = "MM";
10+
private const string ISO3_CODE = "MMR";
11+
private const int NUMERIC_CODE = 104;
12+
private readonly string[] CALLING_CODE = ["+95"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Myanmar;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Ayeyarwady", "MM-07", "Region"),
18+
("Bago", "MM-02", "Region"),
19+
("Chin", "MM-14", "State"),
20+
("Kachin", "MM-11", "State"),
21+
("Kayah", "MM-12", "State"),
22+
("Kayin", "MM-13", "State"),
23+
("Magway", "MM-03", "Region"),
24+
("Mandalay", "MM-04", "Region"),
25+
("Mon", "MM-15", "State"),
26+
("Naypyidaw", "MM-18", "Union Territory"),
27+
("Rakhine", "MM-16", "State"),
28+
("Sagaing", "MM-01", "Region"),
29+
("Shan", "MM-17", "State"),
30+
("Tanintharyi", "MM-05", "Region"),
31+
("Yangon", "MM-06", "Region")
32+
};
33+
34+
[Fact]
35+
public void GetCountry_ReturnsCorrectInformation_ForMyanmar()
36+
{
37+
var country = CountryProvider.GetCountry(EXPECTEDID);
38+
39+
AssertCorrectInformation(
40+
country,
41+
EXPECTEDID,
42+
COUNTRY_NAME,
43+
OFFICIAL_NAME,
44+
NATIVE_NAME,
45+
CAPITAL,
46+
NUMERIC_CODE,
47+
ISO2_CODE,
48+
ISO3_CODE,
49+
CALLING_CODE,
50+
EXPECTED_STATES
51+
);
52+
}
53+
}

0 commit comments

Comments
 (0)