diff --git a/src/World.Net.UnitTests/Countries/IsleOfManTest.cs b/src/World.Net.UnitTests/Countries/IsleOfManTest.cs new file mode 100644 index 0000000..926fe22 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/IsleOfManTest.cs @@ -0,0 +1,44 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class IsleOfManTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Isle of Man"; + private const string OFFICIAL_NAME = "Isle of Man"; + private const string NATIVE_NAME = "Ellan Vannin"; + private const string CAPITAL = "Douglas"; + private const string ISO2_CODE = "IM"; + private const string ISO3_CODE = "IMN"; + private const int NUMERIC_CODE = 833; + private readonly string[] CALLING_CODE = ["+44"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.IsleOfMan; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Ayre", "IM-01", "Sheading"), + ("Garff", "IM-02", "Sheading"), + ("Glenfaba", "IM-03", "Sheading"), + ("Michael", "IM-04", "Sheading"), + ("Middle", "IM-05", "Sheading"), + ("Rushen", "IM-06", "Sheading") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForIsleOfMan() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MalawiTest.cs b/src/World.Net.UnitTests/Countries/MalawiTest.cs new file mode 100644 index 0000000..da793b6 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MalawiTest.cs @@ -0,0 +1,41 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MalawiTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Malawi"; + private const string OFFICIAL_NAME = "Republic of Malawi"; + private const string NATIVE_NAME = "Malawi"; + private const string CAPITAL = "Lilongwe"; + private const string ISO2_CODE = "MW"; + private const string ISO3_CODE = "MWI"; + private const int NUMERIC_CODE = 454; + private readonly string[] CALLING_CODE = ["+265"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Malawi; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Central Region", "MW-C", "Region"), + ("Northern Region", "MW-N", "Region"), + ("Southern Region", "MW-S", "Region") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMalawi() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MalaysiaTest.cs b/src/World.Net.UnitTests/Countries/MalaysiaTest.cs new file mode 100644 index 0000000..e3a264c --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MalaysiaTest.cs @@ -0,0 +1,54 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MalaysiaTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Malaysia"; + private const string OFFICIAL_NAME = "Malaysia"; + private const string NATIVE_NAME = "Malaysia"; + private const string CAPITAL = "Kuala Lumpur"; + private const string ISO2_CODE = "MY"; + private const string ISO3_CODE = "MYS"; + private const int NUMERIC_CODE = 458; + private readonly string[] CALLING_CODE = ["+60"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Malaysia; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Johor", "MY-01", "State"), + ("Kedah", "MY-02", "State"), + ("Kelantan", "MY-03", "State"), + ("Malacca", "MY-04", "State"), + ("Negeri Sembilan", "MY-05", "State"), + ("Pahang", "MY-06", "State"), + ("Penang", "MY-07", "State"), + ("Perak", "MY-08", "State"), + ("Perlis", "MY-09", "State"), + ("Selangor", "MY-10", "State"), + ("Terengganu", "MY-11", "State"), + ("Sabah", "MY-12", "State"), + ("Sarawak", "MY-13", "State"), + ("Kuala Lumpur", "MY-14", "Federal Territory"), + ("Labuan", "MY-15", "Federal Territory"), + ("Putrajaya", "MY-16", "Federal Territory") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMalaysia() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MaldivesTest.cs b/src/World.Net.UnitTests/Countries/MaldivesTest.cs new file mode 100644 index 0000000..75245e5 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MaldivesTest.cs @@ -0,0 +1,58 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MaldivesTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Maldives"; + private const string OFFICIAL_NAME = "Republic of Maldives"; + private const string NATIVE_NAME = "Dhivehi Raajje"; + private const string CAPITAL = "Malé"; + private const string ISO2_CODE = "MV"; + private const string ISO3_CODE = "MDV"; + private const int NUMERIC_CODE = 462; + private readonly string[] CALLING_CODE = ["+960"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Maldives; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Alif Alif", "MV-02", "Administrative Atoll"), + ("Alif Dhaal", "MV-00", "Administrative Atoll"), + ("Baa", "MV-20", "Administrative Atoll"), + ("Dhaalu", "MV-17", "Administrative Atoll"), + ("Faafu", "MV-14", "Administrative Atoll"), + ("Gaafu Alif", "MV-27", "Administrative Atoll"), + ("Gaafu Dhaalu", "MV-28", "Administrative Atoll"), + ("Gnaviyani", "MV-29", "Administrative Atoll"), + ("Haa Alif", "MV-07", "Administrative Atoll"), + ("Haa Dhaalu", "MV-23", "Administrative Atoll"), + ("Kaafu", "MV-26", "Administrative Atoll"), + ("Laamu", "MV-05", "Administrative Atoll"), + ("Lhaviyani", "MV-03", "Administrative Atoll"), + ("Meemu", "MV-12", "Administrative Atoll"), + ("Noonu", "MV-25", "Administrative Atoll"), + ("Raa", "MV-13", "Administrative Atoll"), + ("Shaviyani", "MV-24", "Administrative Atoll"), + ("Thaa", "MV-08", "Administrative Atoll"), + ("Vaavu", "MV-04", "Administrative Atoll"), + ("Malé", "MV-MLE", "City") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMaldives() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MaliTest.cs b/src/World.Net.UnitTests/Countries/MaliTest.cs new file mode 100644 index 0000000..5563b5a --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MaliTest.cs @@ -0,0 +1,47 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MaliTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Mali"; + private const string OFFICIAL_NAME = "Republic of Mali"; + private const string NATIVE_NAME = "Mali"; + private const string CAPITAL = "Bamako"; + private const string ISO2_CODE = "ML"; + private const string ISO3_CODE = "MLI"; + private const int NUMERIC_CODE = 466; + private readonly string[] CALLING_CODE = ["+223"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Mali; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Bamako", "ML-BKO", "District"), + ("Gao", "ML-7", "Region"), + ("Kayes", "ML-1", "Region"), + ("Kidal", "ML-8", "Region"), + ("Koulikoro", "ML-2", "Region"), + ("Mopti", "ML-5", "Region"), + ("Ségou", "ML-4", "Region"), + ("Sikasso", "ML-3", "Region"), + ("Tombouctou", "ML-6", "Region") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMali() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MaltaTest.cs b/src/World.Net.UnitTests/Countries/MaltaTest.cs new file mode 100644 index 0000000..813bd48 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MaltaTest.cs @@ -0,0 +1,44 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MaltaTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Malta"; + private const string OFFICIAL_NAME = "Republic of Malta"; + private const string NATIVE_NAME = "Malta"; + private const string CAPITAL = "Valletta"; + private const string ISO2_CODE = "MT"; + private const string ISO3_CODE = "MLT"; + private const int NUMERIC_CODE = 470; + private readonly string[] CALLING_CODE = ["+356"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Malta; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Gozo", "MT-45", "Region"), + ("Northern Harbour", "MT-48", "Region"), + ("Northern", "MT-51", "Region"), + ("South Eastern", "MT-52", "Region"), + ("Southern Harbour", "MT-53", "Region"), + ("Western", "MT-55", "Region") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMalta() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MarshallIslandsTest.cs b/src/World.Net.UnitTests/Countries/MarshallIslandsTest.cs new file mode 100644 index 0000000..c542e08 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MarshallIslandsTest.cs @@ -0,0 +1,60 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MarshallIslandsTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Marshall Islands"; + private const string OFFICIAL_NAME = "Republic of the Marshall Islands"; + private const string NATIVE_NAME = "Aelōn̄ in M̧ajeļ"; + private const string CAPITAL = "Majuro"; + private const string ISO2_CODE = "MH"; + private const string ISO3_CODE = "MHL"; + private const int NUMERIC_CODE = 584; + private readonly string[] CALLING_CODE = ["+692"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.MarshallIslands; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Ailinglaplap", "MH-ALL", "Municipality"), + ("Arno", "MH-ARN", "Municipality"), + ("Aur", "MH-AUR", "Municipality"), + ("Ebeye", "MH-EBN", "Municipality"), + ("Enewetak", "MH-ENI", "Municipality"), + ("Jabat", "MH-JAB", "Municipality"), + ("Jaluit", "MH-JAL", "Municipality"), + ("Kwajalein", "MH-KWA", "Municipality"), + ("Lae", "MH-LAE", "Municipality"), + ("Lib", "MH-LIB", "Municipality"), + ("Likiep", "MH-LIK", "Municipality"), + ("Majuro", "MH-MAJ", "Municipality"), + ("Maloelap", "MH-MAL", "Municipality"), + ("Mejit", "MH-MEJ", "Municipality"), + ("Mili", "MH-MIL", "Municipality"), + ("Namdrik", "MH-NMK", "Municipality"), + ("Namu", "MH-NMU", "Municipality"), + ("Rongelap", "MH-RON", "Municipality"), + ("Ujae", "MH-UJA", "Municipality"), + ("Utrik", "MH-UTI", "Municipality"), + ("Wotho", "MH-WTH", "Municipality"), + ("Wotje", "MH-WTJ", "Municipality") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMarshallIslands() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MartiniqueTest.cs b/src/World.Net.UnitTests/Countries/MartiniqueTest.cs new file mode 100644 index 0000000..d135d18 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MartiniqueTest.cs @@ -0,0 +1,36 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MartiniqueTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Martinique"; + private const string OFFICIAL_NAME = "Martinique"; + private const string NATIVE_NAME = "Martinique"; + private const string CAPITAL = "Fort-de-France"; + private const string ISO2_CODE = "MQ"; + private const string ISO3_CODE = "MTQ"; + private const int NUMERIC_CODE = 474; + private readonly string[] CALLING_CODE = ["+596"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Martinique; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = Array.Empty<(string, string, string)>(); + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMartinique() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MauritaniaTest.cs b/src/World.Net.UnitTests/Countries/MauritaniaTest.cs new file mode 100644 index 0000000..11c0766 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MauritaniaTest.cs @@ -0,0 +1,53 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MauritaniaTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Mauritania"; + private const string OFFICIAL_NAME = "Islamic Republic of Mauritania"; + private const string NATIVE_NAME = "الجمهورية الإسلامية الموريتانية"; + private const string CAPITAL = "Nouakchott"; + private const string ISO2_CODE = "MR"; + private const string ISO3_CODE = "MRT"; + private const int NUMERIC_CODE = 478; + private readonly string[] CALLING_CODE = ["+222"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Mauritania; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Adrar", "MR-07", "Region"), + ("Assaba", "MR-03", "Region"), + ("Brakna", "MR-05", "Region"), + ("Dakhlet Nouadhibou", "MR-08", "Region"), + ("Gorgol", "MR-04", "Region"), + ("Guidimaka", "MR-10", "Region"), + ("Hodh Ech Chargui", "MR-01", "Region"), + ("Hodh El Gharbi", "MR-02", "Region"), + ("Inchiri", "MR-12", "Region"), + ("Nouakchott Nord", "MR-14", "Region"), + ("Nouakchott Ouest", "MR-13", "Region"), + ("Nouakchott Sud", "MR-15", "Region"), + ("Tagant", "MR-09", "Region"), + ("Tiris Zemmour", "MR-11", "Region"), + ("Trarza", "MR-06", "Region") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMauritania() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MauritiusTest.cs b/src/World.Net.UnitTests/Countries/MauritiusTest.cs new file mode 100644 index 0000000..67cec15 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MauritiusTest.cs @@ -0,0 +1,47 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MauritiusTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Mauritius"; + private const string OFFICIAL_NAME = "Republic of Mauritius"; + private const string NATIVE_NAME = "Maurice"; + private const string CAPITAL = "Port Louis"; + private const string ISO2_CODE = "MU"; + private const string ISO3_CODE = "MUS"; + private const int NUMERIC_CODE = 480; + private readonly string[] CALLING_CODE = ["+230"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Mauritius; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Black River", "MU-BL", "District"), + ("Flacq", "MU-FL", "District"), + ("Grand Port", "MU-GP", "District"), + ("Moka", "MU-MO", "District"), + ("Pamplemousses", "MU-PA", "District"), + ("Plaines Wilhems", "MU-PW", "District"), + ("Port Louis", "MU-PL", "District"), + ("Rivière du Rempart", "MU-RR", "District"), + ("Savanne", "MU-SA", "District") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMauritius() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MayotteTest.cs b/src/World.Net.UnitTests/Countries/MayotteTest.cs new file mode 100644 index 0000000..b3bce14 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MayotteTest.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class MayotteTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Mayotte"; + private const string OFFICIAL_NAME = "Department of Mayotte"; + private const string NATIVE_NAME = "Mayotte"; + private const string CAPITAL = "Mamoudzou"; + private const string ISO2_CODE = "YT"; + private const string ISO3_CODE = "MYT"; + private const int NUMERIC_CODE = 175; + private readonly string[] CALLING_CODE = ["+262"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Mayotte; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = Array.Empty<(string, string, string)>(); + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMayotte() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } + } + +} diff --git a/src/World.Net.UnitTests/Countries/MexicoTest.cs b/src/World.Net.UnitTests/Countries/MexicoTest.cs new file mode 100644 index 0000000..854f2fe --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MexicoTest.cs @@ -0,0 +1,70 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MexicoTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Mexico"; + private const string OFFICIAL_NAME = "United Mexican States"; + private const string NATIVE_NAME = "México"; + private const string CAPITAL = "Mexico City"; + private const string ISO2_CODE = "MX"; + private const string ISO3_CODE = "MEX"; + private const int NUMERIC_CODE = 484; + private readonly string[] CALLING_CODE = ["+52"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Mexico; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Aguascalientes", "MX-AGU", "State"), + ("Baja California", "MX-BCN", "State"), + ("Baja California Sur", "MX-BCS", "State"), + ("Campeche", "MX-CAM", "State"), + ("Chiapas", "MX-CHP", "State"), + ("Chihuahua", "MX-CHH", "State"), + ("Coahuila", "MX-COA", "State"), + ("Colima", "MX-COL", "State"), + ("Durango", "MX-DUR", "State"), + ("Guanajuato", "MX-GUA", "State"), + ("Guerrero", "MX-GRO", "State"), + ("Hidalgo", "MX-HID", "State"), + ("Jalisco", "MX-JAL", "State"), + ("Mexico City", "MX-CMX", "Federal District"), + ("México", "MX-MEX", "State"), + ("Michoacán", "MX-MIC", "State"), + ("Morelos", "MX-MOR", "State"), + ("Nayarit", "MX-NAY", "State"), + ("Nuevo León", "MX-NLE", "State"), + ("Oaxaca", "MX-OAX", "State"), + ("Puebla", "MX-PUE", "State"), + ("Querétaro", "MX-QUE", "State"), + ("Quintana Roo", "MX-ROO", "State"), + ("San Luis Potosí", "MX-SLP", "State"), + ("Sinaloa", "MX-SIN", "State"), + ("Sonora", "MX-SON", "State"), + ("Tabasco", "MX-TAB", "State"), + ("Tamaulipas", "MX-TAM", "State"), + ("Tlaxcala", "MX-TLA", "State"), + ("Veracruz", "MX-VER", "State"), + ("Yucatán", "MX-YUC", "State"), + ("Zacatecas", "MX-ZAC", "State") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMexico() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MicronesiaTest.cs b/src/World.Net.UnitTests/Countries/MicronesiaTest.cs new file mode 100644 index 0000000..83bf8b3 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MicronesiaTest.cs @@ -0,0 +1,42 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MicronesiaTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Micronesia"; + private const string OFFICIAL_NAME = "Federated States of Micronesia"; + private const string NATIVE_NAME = "Federated States of Micronesia"; + private const string CAPITAL = "Palikir"; + private const string ISO2_CODE = "FM"; + private const string ISO3_CODE = "FSM"; + private const int NUMERIC_CODE = 583; + private readonly string[] CALLING_CODE = ["+691"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Micronesia; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Chuuk", "FM-TRK", "State"), + ("Kosrae", "FM-KSA", "State"), + ("Pohnpei", "FM-PNI", "State"), + ("Yap", "FM-YAP", "State") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMicronesia() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/MoldovaTest.cs b/src/World.Net.UnitTests/Countries/MoldovaTest.cs new file mode 100644 index 0000000..5ae87a5 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MoldovaTest.cs @@ -0,0 +1,73 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class MoldovaTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Moldova"; + private const string OFFICIAL_NAME = "Republic of Moldova"; + private const string NATIVE_NAME = "Republica Moldova"; + private const string CAPITAL = "Chișinău"; + private const string ISO2_CODE = "MD"; + private const string ISO3_CODE = "MDA"; + private const int NUMERIC_CODE = 498; + private readonly string[] CALLING_CODE = ["+373"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Moldova; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Bălți", "MD-BA", "City"), + ("Bender", "MD-BD", "City"), + ("Chișinău", "MD-CU", "City"), + ("Anenii Noi", "MD-AN", "District"), + ("Basarabeasca", "MD-BS", "District"), + ("Briceni", "MD-BR", "District"), + ("Cahul", "MD-CA", "District"), + ("Cantemir", "MD-CT", "District"), + ("Călărași", "MD-CL", "District"), + ("Cimișlia", "MD-CM", "District"), + ("Criuleni", "MD-CR", "District"), + ("Dondușeni", "MD-DO", "District"), + ("Drochia", "MD-DR", "District"), + ("Dubăsari", "MD-DU", "District"), + ("Edineț", "MD-ED", "District"), + ("Fălești", "MD-FA", "District"), + ("Florești", "MD-FL", "District"), + ("Glodeni", "MD-GL", "District"), + ("Hîncești", "MD-HI", "District"), + ("Ialoveni", "MD-IA", "District"), + ("Leova", "MD-LE", "District"), + ("Nisporeni", "MD-NI", "District"), + ("Ocnița", "MD-OC", "District"), + ("Orhei", "MD-OR", "District"), + ("Rezina", "MD-RE", "District"), + ("Rîșcani", "MD-RI", "District"), + ("Sîngerei", "MD-SI", "District"), + ("Soroca", "MD-SO", "District"), + ("Strășeni", "MD-ST", "District"), + ("Șoldănești", "MD-SD", "District"), + ("Ștefan Vodă", "MD-SV", "District"), + ("Taraclia", "MD-TA", "District"), + ("Telenești", "MD-TE", "District"), + ("Ungheni", "MD-UN", "District"), + ("Gagauzia", "MD-GA", "Autonomous Region") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMoldova() + { + var country = CountryProvider.GetCountry(EXPECTEDID); + + AssertCorrectInformation( + country, + EXPECTEDID, + COUNTRY_NAME, + OFFICIAL_NAME, + NATIVE_NAME, + CAPITAL, + NUMERIC_CODE, + ISO2_CODE, + ISO3_CODE, + CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net/Countries/IsleOfMan.cs b/src/World.Net/Countries/IsleOfMan.cs new file mode 100644 index 0000000..d7c5903 --- /dev/null +++ b/src/World.Net/Countries/IsleOfMan.cs @@ -0,0 +1,33 @@ +namespace World.Net.Countries; + +internal sealed class IsleOfMan : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.IsleOfMan; + + public string Name { get; } = "Isle of Man"; + + public string OfficialName { get; } = "Isle of Man"; + + public string NativeName => "Ellan Vannin"; + + public string Capital { get; } = "Douglas"; + + public int NumericCode { get; } = 833; + + public string ISO2Code { get; } = "IM"; + + public string ISO3Code { get; } = "IMN"; + + public string[] CallingCode { get; } = ["+44"]; + + public IEnumerable States => new[] + { + new State("Ayre", "IM-01", "Sheading"), + new State("Garff", "IM-02", "Sheading"), + new State("Glenfaba", "IM-03", "Sheading"), + new State("Michael", "IM-04", "Sheading"), + new State("Middle", "IM-05", "Sheading"), + new State("Rushen", "IM-06", "Sheading") + }; +} + diff --git a/src/World.Net/Countries/Malawi.cs b/src/World.Net/Countries/Malawi.cs new file mode 100644 index 0000000..4cf0965 --- /dev/null +++ b/src/World.Net/Countries/Malawi.cs @@ -0,0 +1,30 @@ +namespace World.Net.Countries; + +internal sealed class Malawi : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Malawi; + + public string Name { get; } = "Malawi"; + + public string OfficialName { get; } = "Republic of Malawi"; + + public string NativeName => "Malawi"; + + public string Capital { get; } = "Lilongwe"; + + public int NumericCode { get; } = 454; + + public string ISO2Code { get; } = "MW"; + + public string ISO3Code { get; } = "MWI"; + + public string[] CallingCode { get; } = ["+265"]; + + public IEnumerable States => new[] + { + new State("Central Region", "MW-C", "Region"), + new State("Northern Region", "MW-N", "Region"), + new State("Southern Region", "MW-S", "Region") + }; +} + diff --git a/src/World.Net/Countries/Malaysia.cs b/src/World.Net/Countries/Malaysia.cs new file mode 100644 index 0000000..2d078ee --- /dev/null +++ b/src/World.Net/Countries/Malaysia.cs @@ -0,0 +1,43 @@ +namespace World.Net.Countries; + +internal sealed class Malaysia : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Malaysia; + + public string Name { get; } = "Malaysia"; + + public string OfficialName { get; } = "Malaysia"; + + public string NativeName => "Malaysia"; + + public string Capital { get; } = "Kuala Lumpur"; + + public int NumericCode { get; } = 458; + + public string ISO2Code { get; } = "MY"; + + public string ISO3Code { get; } = "MYS"; + + public string[] CallingCode { get; } = ["+60"]; + + public IEnumerable States => new[] + { + new State("Johor", "MY-01", "State"), + new State("Kedah", "MY-02", "State"), + new State("Kelantan", "MY-03", "State"), + new State("Malacca", "MY-04", "State"), + new State("Negeri Sembilan", "MY-05", "State"), + new State("Pahang", "MY-06", "State"), + new State("Penang", "MY-07", "State"), + new State("Perak", "MY-08", "State"), + new State("Perlis", "MY-09", "State"), + new State("Selangor", "MY-10", "State"), + new State("Terengganu", "MY-11", "State"), + new State("Sabah", "MY-12", "State"), + new State("Sarawak", "MY-13", "State"), + new State("Kuala Lumpur", "MY-14", "Federal Territory"), + new State("Labuan", "MY-15", "Federal Territory"), + new State("Putrajaya", "MY-16", "Federal Territory") + }; +} + diff --git a/src/World.Net/Countries/Maldives.cs b/src/World.Net/Countries/Maldives.cs new file mode 100644 index 0000000..90e6b6a --- /dev/null +++ b/src/World.Net/Countries/Maldives.cs @@ -0,0 +1,47 @@ +namespace World.Net.Countries; + +internal sealed class Maldives : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Maldives; + + public string Name { get; } = "Maldives"; + + public string OfficialName { get; } = "Republic of Maldives"; + + public string NativeName => "Dhivehi Raajje"; + + public string Capital { get; } = "Malé"; + + public int NumericCode { get; } = 462; + + public string ISO2Code { get; } = "MV"; + + public string ISO3Code { get; } = "MDV"; + + public string[] CallingCode { get; } = ["+960"]; + + public IEnumerable States => new[] + { + new State("Alif Alif", "MV-02", "Administrative Atoll"), + new State("Alif Dhaal", "MV-00", "Administrative Atoll"), + new State("Baa", "MV-20", "Administrative Atoll"), + new State("Dhaalu", "MV-17", "Administrative Atoll"), + new State("Faafu", "MV-14", "Administrative Atoll"), + new State("Gaafu Alif", "MV-27", "Administrative Atoll"), + new State("Gaafu Dhaalu", "MV-28", "Administrative Atoll"), + new State("Gnaviyani", "MV-29", "Administrative Atoll"), + new State("Haa Alif", "MV-07", "Administrative Atoll"), + new State("Haa Dhaalu", "MV-23", "Administrative Atoll"), + new State("Kaafu", "MV-26", "Administrative Atoll"), + new State("Laamu", "MV-05", "Administrative Atoll"), + new State("Lhaviyani", "MV-03", "Administrative Atoll"), + new State("Meemu", "MV-12", "Administrative Atoll"), + new State("Noonu", "MV-25", "Administrative Atoll"), + new State("Raa", "MV-13", "Administrative Atoll"), + new State("Shaviyani", "MV-24", "Administrative Atoll"), + new State("Thaa", "MV-08", "Administrative Atoll"), + new State("Vaavu", "MV-04", "Administrative Atoll"), + new State("Malé", "MV-MLE", "City") + }; +} + diff --git a/src/World.Net/Countries/Mali.cs b/src/World.Net/Countries/Mali.cs new file mode 100644 index 0000000..73fdf9c --- /dev/null +++ b/src/World.Net/Countries/Mali.cs @@ -0,0 +1,36 @@ +namespace World.Net.Countries; + +internal sealed class Mali : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Mali; + + public string Name { get; } = "Mali"; + + public string OfficialName { get; } = "Republic of Mali"; + + public string NativeName => "Mali"; + + public string Capital { get; } = "Bamako"; + + public int NumericCode { get; } = 466; + + public string ISO2Code { get; } = "ML"; + + public string ISO3Code { get; } = "MLI"; + + public string[] CallingCode { get; } = ["+223"]; + + public IEnumerable States => new[] + { + new State("Bamako", "ML-BKO", "District"), + new State("Gao", "ML-7", "Region"), + new State("Kayes", "ML-1", "Region"), + new State("Kidal", "ML-8", "Region"), + new State("Koulikoro", "ML-2", "Region"), + new State("Mopti", "ML-5", "Region"), + new State("Ségou", "ML-4", "Region"), + new State("Sikasso", "ML-3", "Region"), + new State("Tombouctou", "ML-6", "Region") + }; +} + diff --git a/src/World.Net/Countries/Malta.cs b/src/World.Net/Countries/Malta.cs new file mode 100644 index 0000000..45d6c6b --- /dev/null +++ b/src/World.Net/Countries/Malta.cs @@ -0,0 +1,33 @@ +namespace World.Net.Countries; + +internal sealed class Malta : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Malta; + + public string Name { get; } = "Malta"; + + public string OfficialName { get; } = "Republic of Malta"; + + public string NativeName => "Malta"; + + public string Capital { get; } = "Valletta"; + + public int NumericCode { get; } = 470; + + public string ISO2Code { get; } = "MT"; + + public string ISO3Code { get; } = "MLT"; + + public string[] CallingCode { get; } = ["+356"]; + + public IEnumerable States => new[] + { + new State("Gozo", "MT-45", "Region"), + new State("Northern Harbour", "MT-48", "Region"), + new State("Northern", "MT-51", "Region"), + new State("South Eastern", "MT-52", "Region"), + new State("Southern Harbour", "MT-53", "Region"), + new State("Western", "MT-55", "Region") + }; +} + diff --git a/src/World.Net/Countries/MarshallIslands.cs b/src/World.Net/Countries/MarshallIslands.cs new file mode 100644 index 0000000..fed232c --- /dev/null +++ b/src/World.Net/Countries/MarshallIslands.cs @@ -0,0 +1,49 @@ +namespace World.Net.Countries; + +internal sealed class MarshallIslands : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.MarshallIslands; + + public string Name { get; } = "Marshall Islands"; + + public string OfficialName { get; } = "Republic of the Marshall Islands"; + + public string NativeName => "Aelōn̄ in M̧ajeļ"; + + public string Capital { get; } = "Majuro"; + + public int NumericCode { get; } = 584; + + public string ISO2Code { get; } = "MH"; + + public string ISO3Code { get; } = "MHL"; + + public string[] CallingCode { get; } = ["+692"]; + + public IEnumerable States => new[] + { + new State("Ailinglaplap", "MH-ALL", "Municipality"), + new State("Arno", "MH-ARN", "Municipality"), + new State("Aur", "MH-AUR", "Municipality"), + new State("Ebeye", "MH-EBN", "Municipality"), + new State("Enewetak", "MH-ENI", "Municipality"), + new State("Jabat", "MH-JAB", "Municipality"), + new State("Jaluit", "MH-JAL", "Municipality"), + new State("Kwajalein", "MH-KWA", "Municipality"), + new State("Lae", "MH-LAE", "Municipality"), + new State("Lib", "MH-LIB", "Municipality"), + new State("Likiep", "MH-LIK", "Municipality"), + new State("Majuro", "MH-MAJ", "Municipality"), + new State("Maloelap", "MH-MAL", "Municipality"), + new State("Mejit", "MH-MEJ", "Municipality"), + new State("Mili", "MH-MIL", "Municipality"), + new State("Namdrik", "MH-NMK", "Municipality"), + new State("Namu", "MH-NMU", "Municipality"), + new State("Rongelap", "MH-RON", "Municipality"), + new State("Ujae", "MH-UJA", "Municipality"), + new State("Utrik", "MH-UTI", "Municipality"), + new State("Wotho", "MH-WTH", "Municipality"), + new State("Wotje", "MH-WTJ", "Municipality") + }; +} + diff --git a/src/World.Net/Countries/Martinique.cs b/src/World.Net/Countries/Martinique.cs new file mode 100644 index 0000000..91d0c04 --- /dev/null +++ b/src/World.Net/Countries/Martinique.cs @@ -0,0 +1,25 @@ +namespace World.Net.Countries; + +internal sealed class Martinique : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Martinique; + + public string Name { get; } = "Martinique"; + + public string OfficialName { get; } = "Martinique"; + + public string NativeName => "Martinique"; + + public string Capital { get; } = "Fort-de-France"; + + public int NumericCode { get; } = 474; + + public string ISO2Code { get; } = "MQ"; + + public string ISO3Code { get; } = "MTQ"; + + public string[] CallingCode { get; } = ["+596"]; + + public IEnumerable States => Array.Empty(); +} + diff --git a/src/World.Net/Countries/Mauritania.cs b/src/World.Net/Countries/Mauritania.cs new file mode 100644 index 0000000..6619545 --- /dev/null +++ b/src/World.Net/Countries/Mauritania.cs @@ -0,0 +1,42 @@ +namespace World.Net.Countries; + +internal sealed class Mauritania : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Mauritania; + + public string Name { get; } = "Mauritania"; + + public string OfficialName { get; } = "Islamic Republic of Mauritania"; + + public string NativeName => "الجمهورية الإسلامية الموريتانية"; + + public string Capital { get; } = "Nouakchott"; + + public int NumericCode { get; } = 478; + + public string ISO2Code { get; } = "MR"; + + public string ISO3Code { get; } = "MRT"; + + public string[] CallingCode { get; } = ["+222"]; + + public IEnumerable States => new[] + { + new State("Adrar", "MR-07", "Region"), + new State("Assaba", "MR-03", "Region"), + new State("Brakna", "MR-05", "Region"), + new State("Dakhlet Nouadhibou", "MR-08", "Region"), + new State("Gorgol", "MR-04", "Region"), + new State("Guidimaka", "MR-10", "Region"), + new State("Hodh Ech Chargui", "MR-01", "Region"), + new State("Hodh El Gharbi", "MR-02", "Region"), + new State("Inchiri", "MR-12", "Region"), + new State("Nouakchott Nord", "MR-14", "Region"), + new State("Nouakchott Ouest", "MR-13", "Region"), + new State("Nouakchott Sud", "MR-15", "Region"), + new State("Tagant", "MR-09", "Region"), + new State("Tiris Zemmour", "MR-11", "Region"), + new State("Trarza", "MR-06", "Region") + }; +} + diff --git a/src/World.Net/Countries/Mauritius.cs b/src/World.Net/Countries/Mauritius.cs new file mode 100644 index 0000000..72d71fe --- /dev/null +++ b/src/World.Net/Countries/Mauritius.cs @@ -0,0 +1,36 @@ +namespace World.Net.Countries; + +internal sealed class Mauritius : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Mauritius; + + public string Name { get; } = "Mauritius"; + + public string OfficialName { get; } = "Republic of Mauritius"; + + public string NativeName => "Maurice"; + + public string Capital { get; } = "Port Louis"; + + public int NumericCode { get; } = 480; + + public string ISO2Code { get; } = "MU"; + + public string ISO3Code { get; } = "MUS"; + + public string[] CallingCode { get; } = ["+230"]; + + public IEnumerable States => new[] + { + new State("Black River", "MU-BL", "District"), + new State("Flacq", "MU-FL", "District"), + new State("Grand Port", "MU-GP", "District"), + new State("Moka", "MU-MO", "District"), + new State("Pamplemousses", "MU-PA", "District"), + new State("Plaines Wilhems", "MU-PW", "District"), + new State("Port Louis", "MU-PL", "District"), + new State("Rivière du Rempart", "MU-RR", "District"), + new State("Savanne", "MU-SA", "District") + }; +} + diff --git a/src/World.Net/Countries/Mayotte.cs b/src/World.Net/Countries/Mayotte.cs new file mode 100644 index 0000000..9934e09 --- /dev/null +++ b/src/World.Net/Countries/Mayotte.cs @@ -0,0 +1,25 @@ +namespace World.Net.Countries; + +internal sealed class Mayotte : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Mayotte; + + public string Name { get; } = "Mayotte"; + + public string OfficialName { get; } = "Department of Mayotte"; + + public string NativeName => "Mayotte"; + + public string Capital { get; } = "Mamoudzou"; + + public int NumericCode { get; } = 175; + + public string ISO2Code { get; } = "YT"; + + public string ISO3Code { get; } = "MYT"; + + public string[] CallingCode { get; } = ["+262"]; + + public IEnumerable States => Array.Empty(); +} + diff --git a/src/World.Net/Countries/Mexico.cs b/src/World.Net/Countries/Mexico.cs new file mode 100644 index 0000000..b146c2d --- /dev/null +++ b/src/World.Net/Countries/Mexico.cs @@ -0,0 +1,59 @@ +namespace World.Net.Countries; + +internal sealed class Mexico : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Mexico; + + public string Name { get; } = "Mexico"; + + public string OfficialName { get; } = "United Mexican States"; + + public string NativeName => "México"; + + public string Capital { get; } = "Mexico City"; + + public int NumericCode { get; } = 484; + + public string ISO2Code { get; } = "MX"; + + public string ISO3Code { get; } = "MEX"; + + public string[] CallingCode { get; } = ["+52"]; + + public IEnumerable States => new[] + { + new State("Aguascalientes", "MX-AGU", "State"), + new State("Baja California", "MX-BCN", "State"), + new State("Baja California Sur", "MX-BCS", "State"), + new State("Campeche", "MX-CAM", "State"), + new State("Chiapas", "MX-CHP", "State"), + new State("Chihuahua", "MX-CHH", "State"), + new State("Coahuila", "MX-COA", "State"), + new State("Colima", "MX-COL", "State"), + new State("Durango", "MX-DUR", "State"), + new State("Guanajuato", "MX-GUA", "State"), + new State("Guerrero", "MX-GRO", "State"), + new State("Hidalgo", "MX-HID", "State"), + new State("Jalisco", "MX-JAL", "State"), + new State("Mexico City", "MX-CMX", "Federal District"), + new State("México", "MX-MEX", "State"), + new State("Michoacán", "MX-MIC", "State"), + new State("Morelos", "MX-MOR", "State"), + new State("Nayarit", "MX-NAY", "State"), + new State("Nuevo León", "MX-NLE", "State"), + new State("Oaxaca", "MX-OAX", "State"), + new State("Puebla", "MX-PUE", "State"), + new State("Querétaro", "MX-QUE", "State"), + new State("Quintana Roo", "MX-ROO", "State"), + new State("San Luis Potosí", "MX-SLP", "State"), + new State("Sinaloa", "MX-SIN", "State"), + new State("Sonora", "MX-SON", "State"), + new State("Tabasco", "MX-TAB", "State"), + new State("Tamaulipas", "MX-TAM", "State"), + new State("Tlaxcala", "MX-TLA", "State"), + new State("Veracruz", "MX-VER", "State"), + new State("Yucatán", "MX-YUC", "State"), + new State("Zacatecas", "MX-ZAC", "State") + }; +} + diff --git a/src/World.Net/Countries/Micronesia.cs b/src/World.Net/Countries/Micronesia.cs new file mode 100644 index 0000000..3a5682a --- /dev/null +++ b/src/World.Net/Countries/Micronesia.cs @@ -0,0 +1,31 @@ +namespace World.Net.Countries; + +internal sealed class Micronesia : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Micronesia; + + public string Name { get; } = "Micronesia"; + + public string OfficialName { get; } = "Federated States of Micronesia"; + + public string NativeName => "Federated States of Micronesia"; + + public string Capital { get; } = "Palikir"; + + public int NumericCode { get; } = 583; + + public string ISO2Code { get; } = "FM"; + + public string ISO3Code { get; } = "FSM"; + + public string[] CallingCode { get; } = ["+691"]; + + public IEnumerable States => new[] + { + new State("Chuuk", "FM-TRK", "State"), + new State("Kosrae", "FM-KSA", "State"), + new State("Pohnpei", "FM-PNI", "State"), + new State("Yap", "FM-YAP", "State") + }; +} + diff --git a/src/World.Net/Countries/Moldova.cs b/src/World.Net/Countries/Moldova.cs new file mode 100644 index 0000000..c469632 --- /dev/null +++ b/src/World.Net/Countries/Moldova.cs @@ -0,0 +1,62 @@ +namespace World.Net.Countries; + +internal sealed class Moldova : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Moldova; + + public string Name { get; } = "Moldova"; + + public string OfficialName { get; } = "Republic of Moldova"; + + public string NativeName => "Republica Moldova"; + + public string Capital { get; } = "Chișinău"; + + public int NumericCode { get; } = 498; + + public string ISO2Code { get; } = "MD"; + + public string ISO3Code { get; } = "MDA"; + + public string[] CallingCode { get; } = ["+373"]; + + public IEnumerable States => new[] + { + new State("Bălți", "MD-BA", "City"), + new State("Bender", "MD-BD", "City"), + new State("Chișinău", "MD-CU", "City"), + new State("Anenii Noi", "MD-AN", "District"), + new State("Basarabeasca", "MD-BS", "District"), + new State("Briceni", "MD-BR", "District"), + new State("Cahul", "MD-CA", "District"), + new State("Cantemir", "MD-CT", "District"), + new State("Călărași", "MD-CL", "District"), + new State("Cimișlia", "MD-CM", "District"), + new State("Criuleni", "MD-CR", "District"), + new State("Dondușeni", "MD-DO", "District"), + new State("Drochia", "MD-DR", "District"), + new State("Dubăsari", "MD-DU", "District"), + new State("Edineț", "MD-ED", "District"), + new State("Fălești", "MD-FA", "District"), + new State("Florești", "MD-FL", "District"), + new State("Glodeni", "MD-GL", "District"), + new State("Hîncești", "MD-HI", "District"), + new State("Ialoveni", "MD-IA", "District"), + new State("Leova", "MD-LE", "District"), + new State("Nisporeni", "MD-NI", "District"), + new State("Ocnița", "MD-OC", "District"), + new State("Orhei", "MD-OR", "District"), + new State("Rezina", "MD-RE", "District"), + new State("Rîșcani", "MD-RI", "District"), + new State("Sîngerei", "MD-SI", "District"), + new State("Soroca", "MD-SO", "District"), + new State("Strășeni", "MD-ST", "District"), + new State("Șoldănești", "MD-SD", "District"), + new State("Ștefan Vodă", "MD-SV", "District"), + new State("Taraclia", "MD-TA", "District"), + new State("Telenești", "MD-TE", "District"), + new State("Ungheni", "MD-UN", "District"), + new State("Gagauzia", "MD-GA", "Autonomous Region") + }; +} + diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index a5d11fe..7887310 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -112,6 +112,7 @@ public static Dictionary Initialize() { CountryIdentifier.Iran, new Iran() }, { CountryIdentifier.Iraq, new Iraq() }, { CountryIdentifier.Ireland, new Ireland() }, + { CountryIdentifier.IsleOfMan, new IsleOfMan() }, { CountryIdentifier.Israel, new Israel() }, { CountryIdentifier.Italy, new Italy() }, { CountryIdentifier.Jamaica, new Jamaica() }, @@ -135,6 +136,19 @@ public static Dictionary Initialize() { CountryIdentifier.Luxembourg, new Luxembourg() }, { CountryIdentifier.MacauSAR, new MacauSAR() }, { CountryIdentifier.Madagascar, new Madagascar() }, + { CountryIdentifier.Malawi, new Malawi() }, + { CountryIdentifier.Malaysia, new Malaysia() }, + { CountryIdentifier.Maldives, new Maldives() }, + { CountryIdentifier.Mali, new Mali() }, + { CountryIdentifier.Malta, new Malta() }, + { CountryIdentifier.MarshallIslands, new MarshallIslands() }, + { CountryIdentifier.Martinique, new Martinique() }, + { CountryIdentifier.Mauritania, new Mauritania() }, + { CountryIdentifier.Mauritius, new Mauritius() }, + { CountryIdentifier.Mayotte, new Mayotte() }, + { CountryIdentifier.Mexico, new Mexico() }, + { CountryIdentifier.Micronesia, new Micronesia() }, + { CountryIdentifier.Moldova, new Moldova() }, { CountryIdentifier.Monaco, new Monaco() }, { CountryIdentifier.Mongolia, new Mongolia() }, { CountryIdentifier.Montenegro, new Montenegro() },