diff --git a/src/World.Net.UnitTests/Countries/NigeriaTest.cs b/src/World.Net.UnitTests/Countries/NigeriaTest.cs new file mode 100644 index 0000000..2e35f4c --- /dev/null +++ b/src/World.Net.UnitTests/Countries/NigeriaTest.cs @@ -0,0 +1,78 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class NigeriaTest : AssertCountryTestBase +{ + private const string NIGERIA_COUNTRY_NAME = "Nigeria"; + private const string NIGERIA_NATIVE_NAME = "Nigeria"; + private const string NIGERIA_CAPITAL = "Abuja"; + private const string NIGERIA_OFFICIAL_NAME = "Federal Republic of Nigeria"; + private const string NIGERIA_ISO2_CODE = "NG"; + private const string NIGERIA_ISO3_CODE = "NGA"; + private const int NIGERIA_NUMERIC_CODE = 566; + private readonly string[] NIGERIA_CALLING_CODE = ["+234"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Nigeria; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Abia", "NG-AB", "State"), + new("Adamawa", "NG-AD", "State"), + new("Akwa Ibom", "NG-AK", "State"), + new("Anambra", "NG-AN", "State"), + new("Bauchi", "NG-BA", "State"), + new("Bayelsa", "NG-BY", "State"), + new("Benue", "NG-BE", "State"), + new("Borno", "NG-BO", "State"), + new("Cross River", "NG-CR", "State"), + new("Delta", "NG-DE", "State"), + new("Ebonyi", "NG-EB", "State"), + new("Edo", "NG-ED", "State"), + new("Ekiti", "NG-EK", "State"), + new("Enugu", "NG-EN", "State"), + new("Gombe", "NG-GO", "State"), + new("Imo", "NG-IM", "State"), + new("Jigawa", "NG-JI", "State"), + new("Kaduna", "NG-KD", "State"), + new("Kano", "NG-KN", "State"), + new("Katsina", "NG-KT", "State"), + new("Kebbi", "NG-KE", "State"), + new("Kogi", "NG-KO", "State"), + new("Kwara", "NG-KW", "State"), + new("Lagos", "NG-LA", "State"), + new("Nasarawa", "NG-NA", "State"), + new("Niger", "NG-NI", "State"), + new("Ogun", "NG-OG", "State"), + new("Ondo", "NG-ON", "State"), + new("Osun", "NG-OS", "State"), + new("Oyo", "NG-OY", "State"), + new("Plateau", "NG-PL", "State"), + new("Rivers", "NG-RI", "State"), + new("Sokoto", "NG-SO", "State"), + new("Taraba", "NG-TA", "State"), + new("Yobe", "NG-YO", "State"), + new("Zamfara", "NG-ZA", "State"), + new("Federal Capital Territory", "NG-FC", "Federal Capital Territory") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForNigeria() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + NIGERIA_COUNTRY_NAME, + NIGERIA_OFFICIAL_NAME, + NIGERIA_NATIVE_NAME, + NIGERIA_CAPITAL, + NIGERIA_NUMERIC_CODE, + NIGERIA_ISO2_CODE, + NIGERIA_ISO3_CODE, + NIGERIA_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/NiueTest.cs b/src/World.Net.UnitTests/Countries/NiueTest.cs new file mode 100644 index 0000000..44b91d5 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/NiueTest.cs @@ -0,0 +1,56 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class NiueTest : AssertCountryTestBase +{ + private const string NIUE_COUNTRY_NAME = "Niue"; + private const string NIUE_NATIVE_NAME = "Niuē"; + private const string NIUE_CAPITAL = "Alofi"; + private const string NIUE_OFFICIAL_NAME = "Niue"; + private const string NIUE_ISO2_CODE = "NU"; + private const string NIUE_ISO3_CODE = "NIU"; + private const int NIUE_NUMERIC_CODE = 570; + private readonly string[] NIUE_CALLING_CODE = ["+683"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Niue; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Alofi North", "NU-01", "Village"), + new("Alofi South", "NU-02", "Village"), + new("Avatele", "NU-03", "Village"), + new("Hakupu", "NU-04", "Village"), + new("Hikutavake", "NU-05", "Village"), + new("Lakepa", "NU-06", "Village"), + new("Liku", "NU-07", "Village"), + new("Makefu", "NU-08", "Village"), + new("Mutalau", "NU-09", "Village"), + new("Namukulu", "NU-10", "Village"), + new("Talava", "NU-11", "Village"), + new("Toi", "NU-12", "Village"), + new("Tufukia", "NU-13", "Village"), + new("Vaiea", "NU-14", "Village") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForNiue() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + NIUE_COUNTRY_NAME, + NIUE_OFFICIAL_NAME, + NIUE_NATIVE_NAME, + NIUE_CAPITAL, + NIUE_NUMERIC_CODE, + NIUE_ISO2_CODE, + NIUE_ISO3_CODE, + NIUE_CALLING_CODE, + EXPECTED_STATES + ); + } +} + diff --git a/src/World.Net.UnitTests/Countries/NorfolkIslandTest.cs b/src/World.Net.UnitTests/Countries/NorfolkIslandTest.cs new file mode 100644 index 0000000..b551696 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/NorfolkIslandTest.cs @@ -0,0 +1,53 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class NorfolkIslandTest : AssertCountryTestBase +{ + private const string NORFOLK_ISLAND_COUNTRY_NAME = "Norfolk Island"; + private const string NORFOLK_ISLAND_NATIVE_NAME = "Norfolk Island"; + private const string NORFOLK_ISLAND_CAPITAL = "Kingston"; + private const string NORFOLK_ISLAND_OFFICIAL_NAME = "Territory of Norfolk Island"; + private const string NORFOLK_ISLAND_ISO2_CODE = "NF"; + private const string NORFOLK_ISLAND_ISO3_CODE = "NFK"; + private const int NORFOLK_ISLAND_NUMERIC_CODE = 574; + private readonly string[] NORFOLK_ISLAND_CALLING_CODE = ["+672"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.NorfolkIsland; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Anson Bay", "NF-01", "Settlement"), + new("Ball Bay", "NF-02", "Settlement"), + new("Bicentennial", "NF-03", "Settlement"), + new("Burnt Pine", "NF-04", "Settlement"), + new("Cascade", "NF-05", "Settlement"), + new("Kingston", "NF-06", "Settlement"), + new("Longridge", "NF-07", "Settlement"), + new("Mount Pitt", "NF-08", "Settlement"), + new("Queen Elizabeth", "NF-09", "Settlement"), + new("Royal", "NF-10", "Settlement"), + new("Suffolk", "NF-11", "Settlement") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForNorfolkIsland() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + NORFOLK_ISLAND_COUNTRY_NAME, + NORFOLK_ISLAND_OFFICIAL_NAME, + NORFOLK_ISLAND_NATIVE_NAME, + NORFOLK_ISLAND_CAPITAL, + NORFOLK_ISLAND_NUMERIC_CODE, + NORFOLK_ISLAND_ISO2_CODE, + NORFOLK_ISLAND_ISO3_CODE, + NORFOLK_ISLAND_CALLING_CODE, + EXPECTED_STATES + ); + } +} + diff --git a/src/World.Net.UnitTests/Countries/NorthKoreaTest.cs b/src/World.Net.UnitTests/Countries/NorthKoreaTest.cs new file mode 100644 index 0000000..303e1e5 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/NorthKoreaTest.cs @@ -0,0 +1,55 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class NorthKoreaTest : AssertCountryTestBase +{ + private const string NORTH_KOREA_COUNTRY_NAME = "North Korea"; + private const string NORTH_KOREA_NATIVE_NAME = "조선민주주의인민공화국"; + private const string NORTH_KOREA_CAPITAL = "Pyongyang"; + private const string NORTH_KOREA_OFFICIAL_NAME = "Democratic People's Republic of Korea"; + private const string NORTH_KOREA_ISO2_CODE = "KP"; + private const string NORTH_KOREA_ISO3_CODE = "PRK"; + private const int NORTH_KOREA_NUMERIC_CODE = 408; + private readonly string[] NORTH_KOREA_CALLING_CODE = ["+850"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.NorthKorea; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Chagang", "KP-CHA", "Province"), + new("North Hamgyong", "KP-HAMN", "Province"), + new("South Hamgyong", "KP-HAMS", "Province"), + new("North Hwanghae", "KP-HWAN", "Province"), + new("South Hwanghae", "KP-HWAS", "Province"), + new("Kangwon", "KP-KAN", "Province"), + new("North Pyongan", "KP-PYON", "Province"), + new("South Pyongan", "KP-PYOS", "Province"), + new("Ryanggang", "KP-RYA", "Province"), + new("Kaesong", "KP-KA", "Special City"), + new("Nampo", "KP-NAM", "Special City"), + new("Pyongyang", "KP-PY", "Directly Governed City"), + new("Rason", "KP-RAS", "Directly Governed City"), + new("Sinuiju", "KP-SIN", "Special City") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForNorthKorea() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + NORTH_KOREA_COUNTRY_NAME, + NORTH_KOREA_OFFICIAL_NAME, + NORTH_KOREA_NATIVE_NAME, + NORTH_KOREA_CAPITAL, + NORTH_KOREA_NUMERIC_CODE, + NORTH_KOREA_ISO2_CODE, + NORTH_KOREA_ISO3_CODE, + NORTH_KOREA_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/NorthMacedoniaTest.cs b/src/World.Net.UnitTests/Countries/NorthMacedoniaTest.cs new file mode 100644 index 0000000..ae16818 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/NorthMacedoniaTest.cs @@ -0,0 +1,49 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class NorthMacedoniaTest : AssertCountryTestBase +{ + private const string NORTH_MACEDONIA_COUNTRY_NAME = "North Macedonia"; + private const string NORTH_MACEDONIA_NATIVE_NAME = "Северна Македонија"; + private const string NORTH_MACEDONIA_CAPITAL = "Skopje"; + private const string NORTH_MACEDONIA_OFFICIAL_NAME = "Republic of North Macedonia"; + private const string NORTH_MACEDONIA_ISO2_CODE = "MK"; + private const string NORTH_MACEDONIA_ISO3_CODE = "MKD"; + private const int NORTH_MACEDONIA_NUMERIC_CODE = 807; + private readonly string[] NORTH_MACEDONIA_CALLING_CODE = ["+389"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.NorthMacedonia; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Eastern", "MK-01", "Region"), + new("North Eastern", "MK-02", "Region"), + new("Skopje", "MK-03", "Region"), + new("Pelagonia", "MK-04", "Region"), + new("Polog", "MK-05", "Region"), + new("South Eastern", "MK-06", "Region"), + new("South Western", "MK-07", "Region"), + new("Vardar", "MK-08", "Region") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForNorthMacedonia() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + NORTH_MACEDONIA_COUNTRY_NAME, + NORTH_MACEDONIA_OFFICIAL_NAME, + NORTH_MACEDONIA_NATIVE_NAME, + NORTH_MACEDONIA_CAPITAL, + NORTH_MACEDONIA_NUMERIC_CODE, + NORTH_MACEDONIA_ISO2_CODE, + NORTH_MACEDONIA_ISO3_CODE, + NORTH_MACEDONIA_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/NorthernMarianaIslandsTest.cs b/src/World.Net.UnitTests/Countries/NorthernMarianaIslandsTest.cs new file mode 100644 index 0000000..1846b82 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/NorthernMarianaIslandsTest.cs @@ -0,0 +1,45 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class NorthernMarianaIslandsTest : AssertCountryTestBase +{ + private const string NORTHERN_MARIANA_ISLANDS_COUNTRY_NAME = "Northern Mariana Islands"; + private const string NORTHERN_MARIANA_ISLANDS_NATIVE_NAME = "Northern Mariana Islands"; + private const string NORTHERN_MARIANA_ISLANDS_CAPITAL = "Saipan"; + private const string NORTHERN_MARIANA_ISLANDS_OFFICIAL_NAME = "Commonwealth of the Northern Mariana Islands"; + private const string NORTHERN_MARIANA_ISLANDS_ISO2_CODE = "MP"; + private const string NORTHERN_MARIANA_ISLANDS_ISO3_CODE = "MNP"; + private const int NORTHERN_MARIANA_ISLANDS_NUMERIC_CODE = 580; + private readonly string[] NORTHERN_MARIANA_ISLANDS_CALLING_CODE = ["+1-670"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.NorthernMarianaIslands; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Saipan", "MP-SA", "Municipality"), + new("Tinian", "MP-TI", "Municipality"), + new("Rota", "MP-RO", "Municipality"), + new("Northern Islands", "MP-NI", "Municipality") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForNorthernMarianaIslands() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + NORTHERN_MARIANA_ISLANDS_COUNTRY_NAME, + NORTHERN_MARIANA_ISLANDS_OFFICIAL_NAME, + NORTHERN_MARIANA_ISLANDS_NATIVE_NAME, + NORTHERN_MARIANA_ISLANDS_CAPITAL, + NORTHERN_MARIANA_ISLANDS_NUMERIC_CODE, + NORTHERN_MARIANA_ISLANDS_ISO2_CODE, + NORTHERN_MARIANA_ISLANDS_ISO3_CODE, + NORTHERN_MARIANA_ISLANDS_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/NorwayTest.cs b/src/World.Net.UnitTests/Countries/NorwayTest.cs new file mode 100644 index 0000000..eff752c --- /dev/null +++ b/src/World.Net.UnitTests/Countries/NorwayTest.cs @@ -0,0 +1,52 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class NorwayTest : AssertCountryTestBase +{ + private const string NORWAY_COUNTRY_NAME = "Norway"; + private const string NORWAY_NATIVE_NAME = "Norge"; + private const string NORWAY_CAPITAL = "Oslo"; + private const string NORWAY_OFFICIAL_NAME = "Kingdom of Norway"; + private const string NORWAY_ISO2_CODE = "NO"; + private const string NORWAY_ISO3_CODE = "NOR"; + private const int NORWAY_NUMERIC_CODE = 578; + private readonly string[] NORWAY_CALLING_CODE = ["+47"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Norway; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Agder", "NO-01", "County"), + new("Innlandet", "NO-02", "County"), + new("Møre og Romsdal", "NO-03", "County"), + new("Nordland", "NO-04", "County"), + new("Oslo", "NO-05", "County"), + new("Rogaland", "NO-06", "County"), + new("Troms og Finnmark", "NO-07", "County"), + new("Trøndelag", "NO-08", "County"), + new("Vestfold og Telemark", "NO-09", "County"), + new("Vestland", "NO-10", "County"), + new("Viken", "NO-11", "County") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForNorway() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + NORWAY_COUNTRY_NAME, + NORWAY_OFFICIAL_NAME, + NORWAY_NATIVE_NAME, + NORWAY_CAPITAL, + NORWAY_NUMERIC_CODE, + NORWAY_ISO2_CODE, + NORWAY_ISO3_CODE, + NORWAY_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net/Countries/Nigeria.cs b/src/World.Net/Countries/Nigeria.cs new file mode 100644 index 0000000..294e58d --- /dev/null +++ b/src/World.Net/Countries/Nigeria.cs @@ -0,0 +1,73 @@ +namespace World.Net.Countries; + +internal sealed class Nigeria : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.Nigeria; + + // + public string Name { get; } = "Nigeria"; + + // + public string OfficialName { get; } = "Federal Republic of Nigeria"; + + // + public string NativeName => "Nigeria"; + + // + public string Capital { get; } = "Abuja"; + + // + public int NumericCode { get; } = 566; + + // + public string ISO2Code { get; } = "NG"; + + // + public string ISO3Code { get; } = "NGA"; + + // + public string[] CallingCode { get; } = ["+234"]; + + // + public IEnumerable States => + [ + new("Abia", "NG-AB", "State"), + new("Adamawa", "NG-AD", "State"), + new("Akwa Ibom", "NG-AK", "State"), + new("Anambra", "NG-AN", "State"), + new("Bauchi", "NG-BA", "State"), + new("Bayelsa", "NG-BY", "State"), + new("Benue", "NG-BE", "State"), + new("Borno", "NG-BO", "State"), + new("Cross River", "NG-CR", "State"), + new("Delta", "NG-DE", "State"), + new("Ebonyi", "NG-EB", "State"), + new("Edo", "NG-ED", "State"), + new("Ekiti", "NG-EK", "State"), + new("Enugu", "NG-EN", "State"), + new("Gombe", "NG-GO", "State"), + new("Imo", "NG-IM", "State"), + new("Jigawa", "NG-JI", "State"), + new("Kaduna", "NG-KD", "State"), + new("Kano", "NG-KN", "State"), + new("Katsina", "NG-KT", "State"), + new("Kebbi", "NG-KE", "State"), + new("Kogi", "NG-KO", "State"), + new("Kwara", "NG-KW", "State"), + new("Lagos", "NG-LA", "State"), + new("Nasarawa", "NG-NA", "State"), + new("Niger", "NG-NI", "State"), + new("Ogun", "NG-OG", "State"), + new("Ondo", "NG-ON", "State"), + new("Osun", "NG-OS", "State"), + new("Oyo", "NG-OY", "State"), + new("Plateau", "NG-PL", "State"), + new("Rivers", "NG-RI", "State"), + new("Sokoto", "NG-SO", "State"), + new("Taraba", "NG-TA", "State"), + new("Yobe", "NG-YO", "State"), + new("Zamfara", "NG-ZA", "State"), + new("Federal Capital Territory", "NG-FC", "Federal Capital Territory") + ]; +} diff --git a/src/World.Net/Countries/Niue.cs b/src/World.Net/Countries/Niue.cs new file mode 100644 index 0000000..3cb8df8 --- /dev/null +++ b/src/World.Net/Countries/Niue.cs @@ -0,0 +1,51 @@ +namespace World.Net.Countries; + +internal sealed class Niue : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.Niue; + + // + public string Name { get; } = "Niue"; + + // + public string OfficialName { get; } = "Niue"; + + // + public string NativeName => "Niuē"; + + // + public string Capital { get; } = "Alofi"; + + // + public int NumericCode { get; } = 570; + + // + public string ISO2Code { get; } = "NU"; + + // + public string ISO3Code { get; } = "NIU"; + + // + public string[] CallingCode { get; } = ["+683"]; + + // + public IEnumerable States => + [ + new("Alofi North", "NU-01", "Village"), + new("Alofi South", "NU-02", "Village"), + new("Avatele", "NU-03", "Village"), + new("Hakupu", "NU-04", "Village"), + new("Hikutavake", "NU-05", "Village"), + new("Lakepa", "NU-06", "Village"), + new("Liku", "NU-07", "Village"), + new("Makefu", "NU-08", "Village"), + new("Mutalau", "NU-09", "Village"), + new("Namukulu", "NU-10", "Village"), + new("Talava", "NU-11", "Village"), + new("Toi", "NU-12", "Village"), + new("Tufukia", "NU-13", "Village"), + new("Vaiea", "NU-14", "Village") + ]; +} + diff --git a/src/World.Net/Countries/NorfolkIsland.cs b/src/World.Net/Countries/NorfolkIsland.cs new file mode 100644 index 0000000..bb2a7ab --- /dev/null +++ b/src/World.Net/Countries/NorfolkIsland.cs @@ -0,0 +1,47 @@ +namespace World.Net.Countries; + +internal sealed class NorfolkIsland : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.NorfolkIsland; + + // + public string Name { get; } = "Norfolk Island"; + + // + public string OfficialName { get; } = "Territory of Norfolk Island"; + + // + public string NativeName => "Norfolk Island"; + + // + public string Capital { get; } = "Kingston"; + + // + public int NumericCode { get; } = 574; + + // + public string ISO2Code { get; } = "NF"; + + // + public string ISO3Code { get; } = "NFK"; + + // + public string[] CallingCode { get; } = ["+672"]; + + // + public IEnumerable States => + [ + new("Anson Bay", "NF-01", "Settlement"), + new("Ball Bay", "NF-02", "Settlement"), + new("Bicentennial", "NF-03", "Settlement"), + new("Burnt Pine", "NF-04", "Settlement"), + new("Cascade", "NF-05", "Settlement"), + new("Kingston", "NF-06", "Settlement"), + new("Longridge", "NF-07", "Settlement"), + new("Mount Pitt", "NF-08", "Settlement"), + new("Queen Elizabeth", "NF-09", "Settlement"), + new("Royal", "NF-10", "Settlement"), + new("Suffolk", "NF-11", "Settlement") + ]; +} diff --git a/src/World.Net/Countries/NorthKorea.cs b/src/World.Net/Countries/NorthKorea.cs new file mode 100644 index 0000000..532aa35 --- /dev/null +++ b/src/World.Net/Countries/NorthKorea.cs @@ -0,0 +1,51 @@ +namespace World.Net.Countries; + +internal sealed class NorthKorea : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.NorthKorea; + + // + public string Name { get; } = "North Korea"; + + // + public string OfficialName { get; } = "Democratic People's Republic of Korea"; + + // + public string NativeName => "조선민주주의인민공화국"; + + // + public string Capital { get; } = "Pyongyang"; + + // + public int NumericCode { get; } = 408; + + // + public string ISO2Code { get; } = "KP"; + + // + public string ISO3Code { get; } = "PRK"; + + // + public string[] CallingCode { get; } = ["+850"]; + + // + public IEnumerable States => + [ + new("Chagang", "KP-CHA", "Province"), + new("North Hamgyong", "KP-HAMN", "Province"), + new("South Hamgyong", "KP-HAMS", "Province"), + new("North Hwanghae", "KP-HWAN", "Province"), + new("South Hwanghae", "KP-HWAS", "Province"), + new("Kangwon", "KP-KAN", "Province"), + new("North Pyongan", "KP-PYON", "Province"), + new("South Pyongan", "KP-PYOS", "Province"), + new("Ryanggang", "KP-RYA", "Province"), + new("Kaesong", "KP-KA", "Special City"), + new("Nampo", "KP-NAM", "Special City"), + new("Pyongyang", "KP-PY", "Directly Governed City"), + new("Rason", "KP-RAS", "Directly Governed City"), + new("Sinuiju", "KP-SIN", "Special City") + ]; +} + diff --git a/src/World.Net/Countries/NorthMacedonia.cs b/src/World.Net/Countries/NorthMacedonia.cs new file mode 100644 index 0000000..5d5368e --- /dev/null +++ b/src/World.Net/Countries/NorthMacedonia.cs @@ -0,0 +1,45 @@ +namespace World.Net.Countries; + +internal sealed class NorthMacedonia : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.NorthMacedonia; + + // + public string Name { get; } = "North Macedonia"; + + // + public string OfficialName { get; } = "Republic of North Macedonia"; + + // + public string NativeName => "Северна Македонија"; + + // + public string Capital { get; } = "Skopje"; + + // + public int NumericCode { get; } = 807; + + // + public string ISO2Code { get; } = "MK"; + + // + public string ISO3Code { get; } = "MKD"; + + // + public string[] CallingCode { get; } = ["+389"]; + + // + public IEnumerable States => + [ + new("Eastern", "MK-01", "Region"), + new("North Eastern", "MK-02", "Region"), + new("Skopje", "MK-03", "Region"), + new("Pelagonia", "MK-04", "Region"), + new("Polog", "MK-05", "Region"), + new("South Eastern", "MK-06", "Region"), + new("South Western", "MK-07", "Region"), + new("Vardar", "MK-08", "Region") + ]; +} + diff --git a/src/World.Net/Countries/NorthernMarianaIslands.cs b/src/World.Net/Countries/NorthernMarianaIslands.cs new file mode 100644 index 0000000..b93086f --- /dev/null +++ b/src/World.Net/Countries/NorthernMarianaIslands.cs @@ -0,0 +1,40 @@ +namespace World.Net.Countries; + +internal sealed class NorthernMarianaIslands : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.NorthernMarianaIslands; + + // + public string Name { get; } = "Northern Mariana Islands"; + + // + public string OfficialName { get; } = "Commonwealth of the Northern Mariana Islands"; + + // + public string NativeName => "Northern Mariana Islands"; + + // + public string Capital { get; } = "Saipan"; + + // + public int NumericCode { get; } = 580; + + // + public string ISO2Code { get; } = "MP"; + + // + public string ISO3Code { get; } = "MNP"; + + // + public string[] CallingCode { get; } = ["+1-670"]; + + // + public IEnumerable States => + [ + new("Saipan", "MP-SA", "Municipality"), + new("Tinian", "MP-TI", "Municipality"), + new("Rota", "MP-RO", "Municipality"), + new("Northern Islands", "MP-NI", "Municipality") + ]; +} diff --git a/src/World.Net/Countries/Norway.cs b/src/World.Net/Countries/Norway.cs new file mode 100644 index 0000000..5c5d510 --- /dev/null +++ b/src/World.Net/Countries/Norway.cs @@ -0,0 +1,48 @@ +namespace World.Net.Countries; + +internal sealed class Norway : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.Norway; + + // + public string Name { get; } = "Norway"; + + // + public string OfficialName { get; } = "Kingdom of Norway"; + + // + public string NativeName => "Norge"; + + // + public string Capital { get; } = "Oslo"; + + // + public int NumericCode { get; } = 578; + + // + public string ISO2Code { get; } = "NO"; + + // + public string ISO3Code { get; } = "NOR"; + + // + public string[] CallingCode { get; } = ["+47"]; + + // + public IEnumerable States => + [ + new("Agder", "NO-01", "County"), + new("Innlandet", "NO-02", "County"), + new("Møre og Romsdal", "NO-03", "County"), + new("Nordland", "NO-04", "County"), + new("Oslo", "NO-05", "County"), + new("Rogaland", "NO-06", "County"), + new("Troms og Finnmark", "NO-07", "County"), + new("Trøndelag", "NO-08", "County"), + new("Vestfold og Telemark", "NO-09", "County"), + new("Vestland", "NO-10", "County"), + new("Viken", "NO-11", "County") + ]; +} + diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index f27693b..65d3f87 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -133,6 +133,13 @@ public static Dictionary Initialize() { CountryIdentifier.Luxembourg, new Luxembourg() }, { CountryIdentifier.MacauSAR, new MacauSAR() }, { CountryIdentifier.Madagascar, new Madagascar() }, + { CountryIdentifier.Nigeria, new Nigeria() }, + { CountryIdentifier.Niue, new Niue() }, + { CountryIdentifier.NorfolkIsland, new NorfolkIsland() }, + { CountryIdentifier.NorthKorea, new NorthKorea() }, + { CountryIdentifier.NorthMacedonia, new NorthMacedonia() }, + { CountryIdentifier.NorthernMarianaIslands, new NorthernMarianaIslands() }, + { CountryIdentifier.Norway, new Norway() }, // Future countries can be added here in the same format. };