Skip to content

Commit 6c6163b

Browse files
authored
Nigeria - Norway (#93)
* Nigeria, Niue, NorkfolkIsland, NorthernMarina, North Korea, North Macedonia, Norway * country initializer updated
1 parent 2d6e952 commit 6c6163b

File tree

15 files changed

+750
-0
lines changed

15 files changed

+750
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class NigeriaTest : AssertCountryTestBase
4+
{
5+
private const string NIGERIA_COUNTRY_NAME = "Nigeria";
6+
private const string NIGERIA_NATIVE_NAME = "Nigeria";
7+
private const string NIGERIA_CAPITAL = "Abuja";
8+
private const string NIGERIA_OFFICIAL_NAME = "Federal Republic of Nigeria";
9+
private const string NIGERIA_ISO2_CODE = "NG";
10+
private const string NIGERIA_ISO3_CODE = "NGA";
11+
private const int NIGERIA_NUMERIC_CODE = 566;
12+
private readonly string[] NIGERIA_CALLING_CODE = ["+234"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Nigeria;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
[
17+
new("Abia", "NG-AB", "State"),
18+
new("Adamawa", "NG-AD", "State"),
19+
new("Akwa Ibom", "NG-AK", "State"),
20+
new("Anambra", "NG-AN", "State"),
21+
new("Bauchi", "NG-BA", "State"),
22+
new("Bayelsa", "NG-BY", "State"),
23+
new("Benue", "NG-BE", "State"),
24+
new("Borno", "NG-BO", "State"),
25+
new("Cross River", "NG-CR", "State"),
26+
new("Delta", "NG-DE", "State"),
27+
new("Ebonyi", "NG-EB", "State"),
28+
new("Edo", "NG-ED", "State"),
29+
new("Ekiti", "NG-EK", "State"),
30+
new("Enugu", "NG-EN", "State"),
31+
new("Gombe", "NG-GO", "State"),
32+
new("Imo", "NG-IM", "State"),
33+
new("Jigawa", "NG-JI", "State"),
34+
new("Kaduna", "NG-KD", "State"),
35+
new("Kano", "NG-KN", "State"),
36+
new("Katsina", "NG-KT", "State"),
37+
new("Kebbi", "NG-KE", "State"),
38+
new("Kogi", "NG-KO", "State"),
39+
new("Kwara", "NG-KW", "State"),
40+
new("Lagos", "NG-LA", "State"),
41+
new("Nasarawa", "NG-NA", "State"),
42+
new("Niger", "NG-NI", "State"),
43+
new("Ogun", "NG-OG", "State"),
44+
new("Ondo", "NG-ON", "State"),
45+
new("Osun", "NG-OS", "State"),
46+
new("Oyo", "NG-OY", "State"),
47+
new("Plateau", "NG-PL", "State"),
48+
new("Rivers", "NG-RI", "State"),
49+
new("Sokoto", "NG-SO", "State"),
50+
new("Taraba", "NG-TA", "State"),
51+
new("Yobe", "NG-YO", "State"),
52+
new("Zamfara", "NG-ZA", "State"),
53+
new("Federal Capital Territory", "NG-FC", "Federal Capital Territory")
54+
];
55+
56+
[Fact]
57+
public void GetCountry_ReturnsCorrectInformation_ForNigeria()
58+
{
59+
// Arrange
60+
// Act
61+
var country = CountryProvider.GetCountry(EXPECTEDID);
62+
63+
// Assert
64+
AssertCorrectInformation(
65+
country,
66+
EXPECTEDID,
67+
NIGERIA_COUNTRY_NAME,
68+
NIGERIA_OFFICIAL_NAME,
69+
NIGERIA_NATIVE_NAME,
70+
NIGERIA_CAPITAL,
71+
NIGERIA_NUMERIC_CODE,
72+
NIGERIA_ISO2_CODE,
73+
NIGERIA_ISO3_CODE,
74+
NIGERIA_CALLING_CODE,
75+
EXPECTED_STATES
76+
);
77+
}
78+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class NiueTest : AssertCountryTestBase
4+
{
5+
private const string NIUE_COUNTRY_NAME = "Niue";
6+
private const string NIUE_NATIVE_NAME = "Niuē";
7+
private const string NIUE_CAPITAL = "Alofi";
8+
private const string NIUE_OFFICIAL_NAME = "Niue";
9+
private const string NIUE_ISO2_CODE = "NU";
10+
private const string NIUE_ISO3_CODE = "NIU";
11+
private const int NIUE_NUMERIC_CODE = 570;
12+
private readonly string[] NIUE_CALLING_CODE = ["+683"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Niue;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
[
17+
new("Alofi North", "NU-01", "Village"),
18+
new("Alofi South", "NU-02", "Village"),
19+
new("Avatele", "NU-03", "Village"),
20+
new("Hakupu", "NU-04", "Village"),
21+
new("Hikutavake", "NU-05", "Village"),
22+
new("Lakepa", "NU-06", "Village"),
23+
new("Liku", "NU-07", "Village"),
24+
new("Makefu", "NU-08", "Village"),
25+
new("Mutalau", "NU-09", "Village"),
26+
new("Namukulu", "NU-10", "Village"),
27+
new("Talava", "NU-11", "Village"),
28+
new("Toi", "NU-12", "Village"),
29+
new("Tufukia", "NU-13", "Village"),
30+
new("Vaiea", "NU-14", "Village")
31+
];
32+
33+
[Fact]
34+
public void GetCountry_ReturnsCorrectInformation_ForNiue()
35+
{
36+
// Arrange
37+
// Act
38+
var country = CountryProvider.GetCountry(EXPECTEDID);
39+
40+
// Assert
41+
AssertCorrectInformation(
42+
country,
43+
EXPECTEDID,
44+
NIUE_COUNTRY_NAME,
45+
NIUE_OFFICIAL_NAME,
46+
NIUE_NATIVE_NAME,
47+
NIUE_CAPITAL,
48+
NIUE_NUMERIC_CODE,
49+
NIUE_ISO2_CODE,
50+
NIUE_ISO3_CODE,
51+
NIUE_CALLING_CODE,
52+
EXPECTED_STATES
53+
);
54+
}
55+
}
56+
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 NorfolkIslandTest : AssertCountryTestBase
4+
{
5+
private const string NORFOLK_ISLAND_COUNTRY_NAME = "Norfolk Island";
6+
private const string NORFOLK_ISLAND_NATIVE_NAME = "Norfolk Island";
7+
private const string NORFOLK_ISLAND_CAPITAL = "Kingston";
8+
private const string NORFOLK_ISLAND_OFFICIAL_NAME = "Territory of Norfolk Island";
9+
private const string NORFOLK_ISLAND_ISO2_CODE = "NF";
10+
private const string NORFOLK_ISLAND_ISO3_CODE = "NFK";
11+
private const int NORFOLK_ISLAND_NUMERIC_CODE = 574;
12+
private readonly string[] NORFOLK_ISLAND_CALLING_CODE = ["+672"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.NorfolkIsland;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
[
17+
new("Anson Bay", "NF-01", "Settlement"),
18+
new("Ball Bay", "NF-02", "Settlement"),
19+
new("Bicentennial", "NF-03", "Settlement"),
20+
new("Burnt Pine", "NF-04", "Settlement"),
21+
new("Cascade", "NF-05", "Settlement"),
22+
new("Kingston", "NF-06", "Settlement"),
23+
new("Longridge", "NF-07", "Settlement"),
24+
new("Mount Pitt", "NF-08", "Settlement"),
25+
new("Queen Elizabeth", "NF-09", "Settlement"),
26+
new("Royal", "NF-10", "Settlement"),
27+
new("Suffolk", "NF-11", "Settlement")
28+
];
29+
30+
[Fact]
31+
public void GetCountry_ReturnsCorrectInformation_ForNorfolkIsland()
32+
{
33+
// Arrange
34+
// Act
35+
var country = CountryProvider.GetCountry(EXPECTEDID);
36+
37+
// Assert
38+
AssertCorrectInformation(
39+
country,
40+
EXPECTEDID,
41+
NORFOLK_ISLAND_COUNTRY_NAME,
42+
NORFOLK_ISLAND_OFFICIAL_NAME,
43+
NORFOLK_ISLAND_NATIVE_NAME,
44+
NORFOLK_ISLAND_CAPITAL,
45+
NORFOLK_ISLAND_NUMERIC_CODE,
46+
NORFOLK_ISLAND_ISO2_CODE,
47+
NORFOLK_ISLAND_ISO3_CODE,
48+
NORFOLK_ISLAND_CALLING_CODE,
49+
EXPECTED_STATES
50+
);
51+
}
52+
}
53+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class NorthKoreaTest : AssertCountryTestBase
4+
{
5+
private const string NORTH_KOREA_COUNTRY_NAME = "North Korea";
6+
private const string NORTH_KOREA_NATIVE_NAME = "조선민주주의인민공화국";
7+
private const string NORTH_KOREA_CAPITAL = "Pyongyang";
8+
private const string NORTH_KOREA_OFFICIAL_NAME = "Democratic People's Republic of Korea";
9+
private const string NORTH_KOREA_ISO2_CODE = "KP";
10+
private const string NORTH_KOREA_ISO3_CODE = "PRK";
11+
private const int NORTH_KOREA_NUMERIC_CODE = 408;
12+
private readonly string[] NORTH_KOREA_CALLING_CODE = ["+850"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.NorthKorea;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
[
17+
new("Chagang", "KP-CHA", "Province"),
18+
new("North Hamgyong", "KP-HAMN", "Province"),
19+
new("South Hamgyong", "KP-HAMS", "Province"),
20+
new("North Hwanghae", "KP-HWAN", "Province"),
21+
new("South Hwanghae", "KP-HWAS", "Province"),
22+
new("Kangwon", "KP-KAN", "Province"),
23+
new("North Pyongan", "KP-PYON", "Province"),
24+
new("South Pyongan", "KP-PYOS", "Province"),
25+
new("Ryanggang", "KP-RYA", "Province"),
26+
new("Kaesong", "KP-KA", "Special City"),
27+
new("Nampo", "KP-NAM", "Special City"),
28+
new("Pyongyang", "KP-PY", "Directly Governed City"),
29+
new("Rason", "KP-RAS", "Directly Governed City"),
30+
new("Sinuiju", "KP-SIN", "Special City")
31+
];
32+
33+
[Fact]
34+
public void GetCountry_ReturnsCorrectInformation_ForNorthKorea()
35+
{
36+
// Arrange
37+
// Act
38+
var country = CountryProvider.GetCountry(EXPECTEDID);
39+
40+
// Assert
41+
AssertCorrectInformation(
42+
country,
43+
EXPECTEDID,
44+
NORTH_KOREA_COUNTRY_NAME,
45+
NORTH_KOREA_OFFICIAL_NAME,
46+
NORTH_KOREA_NATIVE_NAME,
47+
NORTH_KOREA_CAPITAL,
48+
NORTH_KOREA_NUMERIC_CODE,
49+
NORTH_KOREA_ISO2_CODE,
50+
NORTH_KOREA_ISO3_CODE,
51+
NORTH_KOREA_CALLING_CODE,
52+
EXPECTED_STATES
53+
);
54+
}
55+
}
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 NorthMacedoniaTest : AssertCountryTestBase
4+
{
5+
private const string NORTH_MACEDONIA_COUNTRY_NAME = "North Macedonia";
6+
private const string NORTH_MACEDONIA_NATIVE_NAME = "Северна Македонија";
7+
private const string NORTH_MACEDONIA_CAPITAL = "Skopje";
8+
private const string NORTH_MACEDONIA_OFFICIAL_NAME = "Republic of North Macedonia";
9+
private const string NORTH_MACEDONIA_ISO2_CODE = "MK";
10+
private const string NORTH_MACEDONIA_ISO3_CODE = "MKD";
11+
private const int NORTH_MACEDONIA_NUMERIC_CODE = 807;
12+
private readonly string[] NORTH_MACEDONIA_CALLING_CODE = ["+389"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.NorthMacedonia;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
[
17+
new("Eastern", "MK-01", "Region"),
18+
new("North Eastern", "MK-02", "Region"),
19+
new("Skopje", "MK-03", "Region"),
20+
new("Pelagonia", "MK-04", "Region"),
21+
new("Polog", "MK-05", "Region"),
22+
new("South Eastern", "MK-06", "Region"),
23+
new("South Western", "MK-07", "Region"),
24+
new("Vardar", "MK-08", "Region")
25+
];
26+
27+
[Fact]
28+
public void GetCountry_ReturnsCorrectInformation_ForNorthMacedonia()
29+
{
30+
// Arrange
31+
// Act
32+
var country = CountryProvider.GetCountry(EXPECTEDID);
33+
34+
// Assert
35+
AssertCorrectInformation(
36+
country,
37+
EXPECTEDID,
38+
NORTH_MACEDONIA_COUNTRY_NAME,
39+
NORTH_MACEDONIA_OFFICIAL_NAME,
40+
NORTH_MACEDONIA_NATIVE_NAME,
41+
NORTH_MACEDONIA_CAPITAL,
42+
NORTH_MACEDONIA_NUMERIC_CODE,
43+
NORTH_MACEDONIA_ISO2_CODE,
44+
NORTH_MACEDONIA_ISO3_CODE,
45+
NORTH_MACEDONIA_CALLING_CODE,
46+
EXPECTED_STATES
47+
);
48+
}
49+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class NorthernMarianaIslandsTest : AssertCountryTestBase
4+
{
5+
private const string NORTHERN_MARIANA_ISLANDS_COUNTRY_NAME = "Northern Mariana Islands";
6+
private const string NORTHERN_MARIANA_ISLANDS_NATIVE_NAME = "Northern Mariana Islands";
7+
private const string NORTHERN_MARIANA_ISLANDS_CAPITAL = "Saipan";
8+
private const string NORTHERN_MARIANA_ISLANDS_OFFICIAL_NAME = "Commonwealth of the Northern Mariana Islands";
9+
private const string NORTHERN_MARIANA_ISLANDS_ISO2_CODE = "MP";
10+
private const string NORTHERN_MARIANA_ISLANDS_ISO3_CODE = "MNP";
11+
private const int NORTHERN_MARIANA_ISLANDS_NUMERIC_CODE = 580;
12+
private readonly string[] NORTHERN_MARIANA_ISLANDS_CALLING_CODE = ["+1-670"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.NorthernMarianaIslands;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
[
17+
new("Saipan", "MP-SA", "Municipality"),
18+
new("Tinian", "MP-TI", "Municipality"),
19+
new("Rota", "MP-RO", "Municipality"),
20+
new("Northern Islands", "MP-NI", "Municipality")
21+
];
22+
23+
[Fact]
24+
public void GetCountry_ReturnsCorrectInformation_ForNorthernMarianaIslands()
25+
{
26+
// Arrange
27+
// Act
28+
var country = CountryProvider.GetCountry(EXPECTEDID);
29+
30+
// Assert
31+
AssertCorrectInformation(
32+
country,
33+
EXPECTEDID,
34+
NORTHERN_MARIANA_ISLANDS_COUNTRY_NAME,
35+
NORTHERN_MARIANA_ISLANDS_OFFICIAL_NAME,
36+
NORTHERN_MARIANA_ISLANDS_NATIVE_NAME,
37+
NORTHERN_MARIANA_ISLANDS_CAPITAL,
38+
NORTHERN_MARIANA_ISLANDS_NUMERIC_CODE,
39+
NORTHERN_MARIANA_ISLANDS_ISO2_CODE,
40+
NORTHERN_MARIANA_ISLANDS_ISO3_CODE,
41+
NORTHERN_MARIANA_ISLANDS_CALLING_CODE,
42+
EXPECTED_STATES
43+
);
44+
}
45+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
namespace World.Net.UnitTests.Countries;
2+
3+
public sealed class NorwayTest : AssertCountryTestBase
4+
{
5+
private const string NORWAY_COUNTRY_NAME = "Norway";
6+
private const string NORWAY_NATIVE_NAME = "Norge";
7+
private const string NORWAY_CAPITAL = "Oslo";
8+
private const string NORWAY_OFFICIAL_NAME = "Kingdom of Norway";
9+
private const string NORWAY_ISO2_CODE = "NO";
10+
private const string NORWAY_ISO3_CODE = "NOR";
11+
private const int NORWAY_NUMERIC_CODE = 578;
12+
private readonly string[] NORWAY_CALLING_CODE = ["+47"];
13+
private const CountryIdentifier EXPECTEDID = CountryIdentifier.Norway;
14+
15+
private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES =
16+
[
17+
new("Agder", "NO-01", "County"),
18+
new("Innlandet", "NO-02", "County"),
19+
new("Møre og Romsdal", "NO-03", "County"),
20+
new("Nordland", "NO-04", "County"),
21+
new("Oslo", "NO-05", "County"),
22+
new("Rogaland", "NO-06", "County"),
23+
new("Troms og Finnmark", "NO-07", "County"),
24+
new("Trøndelag", "NO-08", "County"),
25+
new("Vestfold og Telemark", "NO-09", "County"),
26+
new("Vestland", "NO-10", "County"),
27+
new("Viken", "NO-11", "County")
28+
];
29+
30+
[Fact]
31+
public void GetCountry_ReturnsCorrectInformation_ForNorway()
32+
{
33+
// Arrange
34+
// Act
35+
var country = CountryProvider.GetCountry(EXPECTEDID);
36+
37+
// Assert
38+
AssertCorrectInformation(
39+
country,
40+
EXPECTEDID,
41+
NORWAY_COUNTRY_NAME,
42+
NORWAY_OFFICIAL_NAME,
43+
NORWAY_NATIVE_NAME,
44+
NORWAY_CAPITAL,
45+
NORWAY_NUMERIC_CODE,
46+
NORWAY_ISO2_CODE,
47+
NORWAY_ISO3_CODE,
48+
NORWAY_CALLING_CODE,
49+
EXPECTED_STATES
50+
);
51+
}
52+
}

0 commit comments

Comments
 (0)