Skip to content

Commit 4e8b6d0

Browse files
authored
New countries 13 (#101)
* added details for more countries * added details for more countries
1 parent 4ad8e33 commit 4e8b6d0

29 files changed

+1278
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class IsleOfManTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Isle of Man";
6+
private const string OFFICIAL_NAME = "Isle of Man";
7+
private const string NATIVE_NAME = "Ellan Vannin";
8+
private const string CAPITAL = "Douglas";
9+
private const string ISO2_CODE = "IM";
10+
private const string ISO3_CODE = "IMN";
11+
private const int NUMERIC_CODE = 833;
12+
private readonly string[] CALLING_CODE = ["+44"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.IsleOfMan;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Ayre", "IM-01", "Sheading"),
18+
("Garff", "IM-02", "Sheading"),
19+
("Glenfaba", "IM-03", "Sheading"),
20+
("Michael", "IM-04", "Sheading"),
21+
("Middle", "IM-05", "Sheading"),
22+
("Rushen", "IM-06", "Sheading")
23+
};
24+
25+
[Fact]
26+
public void GetCountry_ReturnsCorrectInformation_ForIsleOfMan()
27+
{
28+
var country = CountryProvider.GetCountry(EXPECTEDID);
29+
30+
AssertCorrectInformation(
31+
country,
32+
EXPECTEDID,
33+
COUNTRY_NAME,
34+
OFFICIAL_NAME,
35+
NATIVE_NAME,
36+
CAPITAL,
37+
NUMERIC_CODE,
38+
ISO2_CODE,
39+
ISO3_CODE,
40+
CALLING_CODE,
41+
EXPECTED_STATES
42+
);
43+
}
44+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MalawiTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Malawi";
6+
private const string OFFICIAL_NAME = "Republic of Malawi";
7+
private const string NATIVE_NAME = "Malawi";
8+
private const string CAPITAL = "Lilongwe";
9+
private const string ISO2_CODE = "MW";
10+
private const string ISO3_CODE = "MWI";
11+
private const int NUMERIC_CODE = 454;
12+
private readonly string[] CALLING_CODE = ["+265"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Malawi;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Central Region", "MW-C", "Region"),
18+
("Northern Region", "MW-N", "Region"),
19+
("Southern Region", "MW-S", "Region")
20+
};
21+
22+
[Fact]
23+
public void GetCountry_ReturnsCorrectInformation_ForMalawi()
24+
{
25+
var country = CountryProvider.GetCountry(EXPECTEDID);
26+
27+
AssertCorrectInformation(
28+
country,
29+
EXPECTEDID,
30+
COUNTRY_NAME,
31+
OFFICIAL_NAME,
32+
NATIVE_NAME,
33+
CAPITAL,
34+
NUMERIC_CODE,
35+
ISO2_CODE,
36+
ISO3_CODE,
37+
CALLING_CODE,
38+
EXPECTED_STATES
39+
);
40+
}
41+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MalaysiaTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Malaysia";
6+
private const string OFFICIAL_NAME = "Malaysia";
7+
private const string NATIVE_NAME = "Malaysia";
8+
private const string CAPITAL = "Kuala Lumpur";
9+
private const string ISO2_CODE = "MY";
10+
private const string ISO3_CODE = "MYS";
11+
private const int NUMERIC_CODE = 458;
12+
private readonly string[] CALLING_CODE = ["+60"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Malaysia;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Johor", "MY-01", "State"),
18+
("Kedah", "MY-02", "State"),
19+
("Kelantan", "MY-03", "State"),
20+
("Malacca", "MY-04", "State"),
21+
("Negeri Sembilan", "MY-05", "State"),
22+
("Pahang", "MY-06", "State"),
23+
("Penang", "MY-07", "State"),
24+
("Perak", "MY-08", "State"),
25+
("Perlis", "MY-09", "State"),
26+
("Selangor", "MY-10", "State"),
27+
("Terengganu", "MY-11", "State"),
28+
("Sabah", "MY-12", "State"),
29+
("Sarawak", "MY-13", "State"),
30+
("Kuala Lumpur", "MY-14", "Federal Territory"),
31+
("Labuan", "MY-15", "Federal Territory"),
32+
("Putrajaya", "MY-16", "Federal Territory")
33+
};
34+
35+
[Fact]
36+
public void GetCountry_ReturnsCorrectInformation_ForMalaysia()
37+
{
38+
var country = CountryProvider.GetCountry(EXPECTEDID);
39+
40+
AssertCorrectInformation(
41+
country,
42+
EXPECTEDID,
43+
COUNTRY_NAME,
44+
OFFICIAL_NAME,
45+
NATIVE_NAME,
46+
CAPITAL,
47+
NUMERIC_CODE,
48+
ISO2_CODE,
49+
ISO3_CODE,
50+
CALLING_CODE,
51+
EXPECTED_STATES
52+
);
53+
}
54+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MaldivesTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Maldives";
6+
private const string OFFICIAL_NAME = "Republic of Maldives";
7+
private const string NATIVE_NAME = "Dhivehi Raajje";
8+
private const string CAPITAL = "Malé";
9+
private const string ISO2_CODE = "MV";
10+
private const string ISO3_CODE = "MDV";
11+
private const int NUMERIC_CODE = 462;
12+
private readonly string[] CALLING_CODE = ["+960"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Maldives;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Alif Alif", "MV-02", "Administrative Atoll"),
18+
("Alif Dhaal", "MV-00", "Administrative Atoll"),
19+
("Baa", "MV-20", "Administrative Atoll"),
20+
("Dhaalu", "MV-17", "Administrative Atoll"),
21+
("Faafu", "MV-14", "Administrative Atoll"),
22+
("Gaafu Alif", "MV-27", "Administrative Atoll"),
23+
("Gaafu Dhaalu", "MV-28", "Administrative Atoll"),
24+
("Gnaviyani", "MV-29", "Administrative Atoll"),
25+
("Haa Alif", "MV-07", "Administrative Atoll"),
26+
("Haa Dhaalu", "MV-23", "Administrative Atoll"),
27+
("Kaafu", "MV-26", "Administrative Atoll"),
28+
("Laamu", "MV-05", "Administrative Atoll"),
29+
("Lhaviyani", "MV-03", "Administrative Atoll"),
30+
("Meemu", "MV-12", "Administrative Atoll"),
31+
("Noonu", "MV-25", "Administrative Atoll"),
32+
("Raa", "MV-13", "Administrative Atoll"),
33+
("Shaviyani", "MV-24", "Administrative Atoll"),
34+
("Thaa", "MV-08", "Administrative Atoll"),
35+
("Vaavu", "MV-04", "Administrative Atoll"),
36+
("Malé", "MV-MLE", "City")
37+
};
38+
39+
[Fact]
40+
public void GetCountry_ReturnsCorrectInformation_ForMaldives()
41+
{
42+
var country = CountryProvider.GetCountry(EXPECTEDID);
43+
44+
AssertCorrectInformation(
45+
country,
46+
EXPECTEDID,
47+
COUNTRY_NAME,
48+
OFFICIAL_NAME,
49+
NATIVE_NAME,
50+
CAPITAL,
51+
NUMERIC_CODE,
52+
ISO2_CODE,
53+
ISO3_CODE,
54+
CALLING_CODE,
55+
EXPECTED_STATES
56+
);
57+
}
58+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MaliTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Mali";
6+
private const string OFFICIAL_NAME = "Republic of Mali";
7+
private const string NATIVE_NAME = "Mali";
8+
private const string CAPITAL = "Bamako";
9+
private const string ISO2_CODE = "ML";
10+
private const string ISO3_CODE = "MLI";
11+
private const int NUMERIC_CODE = 466;
12+
private readonly string[] CALLING_CODE = ["+223"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Mali;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Bamako", "ML-BKO", "District"),
18+
("Gao", "ML-7", "Region"),
19+
("Kayes", "ML-1", "Region"),
20+
("Kidal", "ML-8", "Region"),
21+
("Koulikoro", "ML-2", "Region"),
22+
("Mopti", "ML-5", "Region"),
23+
("Ségou", "ML-4", "Region"),
24+
("Sikasso", "ML-3", "Region"),
25+
("Tombouctou", "ML-6", "Region")
26+
};
27+
28+
[Fact]
29+
public void GetCountry_ReturnsCorrectInformation_ForMali()
30+
{
31+
var country = CountryProvider.GetCountry(EXPECTEDID);
32+
33+
AssertCorrectInformation(
34+
country,
35+
EXPECTEDID,
36+
COUNTRY_NAME,
37+
OFFICIAL_NAME,
38+
NATIVE_NAME,
39+
CAPITAL,
40+
NUMERIC_CODE,
41+
ISO2_CODE,
42+
ISO3_CODE,
43+
CALLING_CODE,
44+
EXPECTED_STATES
45+
);
46+
}
47+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MaltaTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Malta";
6+
private const string OFFICIAL_NAME = "Republic of Malta";
7+
private const string NATIVE_NAME = "Malta";
8+
private const string CAPITAL = "Valletta";
9+
private const string ISO2_CODE = "MT";
10+
private const string ISO3_CODE = "MLT";
11+
private const int NUMERIC_CODE = 470;
12+
private readonly string[] CALLING_CODE = ["+356"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Malta;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Gozo", "MT-45", "Region"),
18+
("Northern Harbour", "MT-48", "Region"),
19+
("Northern", "MT-51", "Region"),
20+
("South Eastern", "MT-52", "Region"),
21+
("Southern Harbour", "MT-53", "Region"),
22+
("Western", "MT-55", "Region")
23+
};
24+
25+
[Fact]
26+
public void GetCountry_ReturnsCorrectInformation_ForMalta()
27+
{
28+
var country = CountryProvider.GetCountry(EXPECTEDID);
29+
30+
AssertCorrectInformation(
31+
country,
32+
EXPECTEDID,
33+
COUNTRY_NAME,
34+
OFFICIAL_NAME,
35+
NATIVE_NAME,
36+
CAPITAL,
37+
NUMERIC_CODE,
38+
ISO2_CODE,
39+
ISO3_CODE,
40+
CALLING_CODE,
41+
EXPECTED_STATES
42+
);
43+
}
44+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class MarshallIslandsTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Marshall Islands";
6+
private const string OFFICIAL_NAME = "Republic of the Marshall Islands";
7+
private const string NATIVE_NAME = "Aelōn̄ in M̧ajeļ";
8+
private const string CAPITAL = "Majuro";
9+
private const string ISO2_CODE = "MH";
10+
private const string ISO3_CODE = "MHL";
11+
private const int NUMERIC_CODE = 584;
12+
private readonly string[] CALLING_CODE = ["+692"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.MarshallIslands;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
{
17+
("Ailinglaplap", "MH-ALL", "Municipality"),
18+
("Arno", "MH-ARN", "Municipality"),
19+
("Aur", "MH-AUR", "Municipality"),
20+
("Ebeye", "MH-EBN", "Municipality"),
21+
("Enewetak", "MH-ENI", "Municipality"),
22+
("Jabat", "MH-JAB", "Municipality"),
23+
("Jaluit", "MH-JAL", "Municipality"),
24+
("Kwajalein", "MH-KWA", "Municipality"),
25+
("Lae", "MH-LAE", "Municipality"),
26+
("Lib", "MH-LIB", "Municipality"),
27+
("Likiep", "MH-LIK", "Municipality"),
28+
("Majuro", "MH-MAJ", "Municipality"),
29+
("Maloelap", "MH-MAL", "Municipality"),
30+
("Mejit", "MH-MEJ", "Municipality"),
31+
("Mili", "MH-MIL", "Municipality"),
32+
("Namdrik", "MH-NMK", "Municipality"),
33+
("Namu", "MH-NMU", "Municipality"),
34+
("Rongelap", "MH-RON", "Municipality"),
35+
("Ujae", "MH-UJA", "Municipality"),
36+
("Utrik", "MH-UTI", "Municipality"),
37+
("Wotho", "MH-WTH", "Municipality"),
38+
("Wotje", "MH-WTJ", "Municipality")
39+
};
40+
41+
[Fact]
42+
public void GetCountry_ReturnsCorrectInformation_ForMarshallIslands()
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 MartiniqueTest : AssertCountryTestBase
4+
{
5+
private const string COUNTRY_NAME = "Martinique";
6+
private const string OFFICIAL_NAME = "Martinique";
7+
private const string NATIVE_NAME = "Martinique";
8+
private const string CAPITAL = "Fort-de-France";
9+
private const string ISO2_CODE = "MQ";
10+
private const string ISO3_CODE = "MTQ";
11+
private const int NUMERIC_CODE = 474;
12+
private readonly string[] CALLING_CODE = ["+596"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Martinique;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = Array.Empty<(string, string, string)>();
16+
17+
[Fact]
18+
public void GetCountry_ReturnsCorrectInformation_ForMartinique()
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+
}

0 commit comments

Comments
 (0)