diff --git a/src/World.Net.UnitTests/Countries/UgandaTest.cs b/src/World.Net.UnitTests/Countries/UgandaTest.cs new file mode 100644 index 0000000..95f249a --- /dev/null +++ b/src/World.Net.UnitTests/Countries/UgandaTest.cs @@ -0,0 +1,42 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class UgandaTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Uganda"; + private const string NATIVE_NAME = "Uganda"; + private const string CAPITAL = "Kampala"; + private const string OFFICIAL_NAME = "Republic of Uganda"; + private const string ISO2_CODE = "UG"; + private const string ISO3_CODE = "UGA"; + private const int NUMERIC_CODE = 800; + private readonly string[] CALLING_CODE = ["+256"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Uganda; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Central", "UG-C", "Region"), + ("Eastern", "UG-E", "Region"), + ("Northern", "UG-N", "Region"), + ("Western", "UG-W", "Region") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForUganda() + { + 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/UkraineTest.cs b/src/World.Net.UnitTests/Countries/UkraineTest.cs new file mode 100644 index 0000000..5bd2c83 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/UkraineTest.cs @@ -0,0 +1,65 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class UkraineTest : AssertCountryTestBase +{ + private const string COUNTRY_NAME = "Ukraine"; + private const string NATIVE_NAME = "Україна"; + private const string CAPITAL = "Kyiv"; + private const string OFFICIAL_NAME = "Ukraine"; + private const string ISO2_CODE = "UA"; + private const string ISO3_CODE = "UKR"; + private const int NUMERIC_CODE = 804; + private readonly string[] CALLING_CODE = ["+380"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Ukraine; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Cherkasy", "UA-CK", "Oblast"), + ("Chernihiv", "UA-CH", "Oblast"), + ("Chernivtsi", "UA-CV", "Oblast"), + ("Dnipropetrovsk", "UA-DP", "Oblast"), + ("Donetsk", "UA-DO", "Oblast"), + ("Ivano-Frankivsk", "UA-IF", "Oblast"), + ("Kharkiv", "UA-KH", "Oblast"), + ("Kherson", "UA-KH", "Oblast"), + ("Khmelnytskyi", "UA-KM", "Oblast"), + ("Kirovohrad", "UA-KR", "Oblast"), + ("Kyiv", "UA-KY", "City"), + ("Kyiv Oblast", "UA-KY", "Oblast"), + ("Luhansk", "UA-LU", "Oblast"), + ("Lviv", "UA-LV", "Oblast"), + ("Mykolaiv", "UA-MK", "Oblast"), + ("Odessa", "UA-OD", "Oblast"), + ("Poltava", "UA-PL", "Oblast"), + ("Rivne", "UA-RV", "Oblast"), + ("Sevastopol", "UA-SE", "City"), + ("Sumy", "UA-SU", "Oblast"), + ("Ternopil", "UA-TE", "Oblast"), + ("Vinnytsia", "UA-VI", "Oblast"), + ("Volyn", "UA-VO", "Oblast"), + ("Zakarpattia", "UA-ZA", "Oblast"), + ("Zaporizhzhia", "UA-ZP", "Oblast"), + ("Zhytomyr", "UA-ZH", "Oblast"), + ("Autonomous Republic of Crimea", "UA-CR", "Autonomous Republic") +}; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForUkraine() + { + 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/UnitedArabEmiratesTest.cs b/src/World.Net.UnitTests/Countries/UnitedArabEmiratesTest.cs new file mode 100644 index 0000000..7e0d0b8 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/UnitedArabEmiratesTest.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class UnitedArabEmiratesTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "United Arab Emirates"; + private const string NATIVE_NAME = "الإمارات العربية المتحدة"; + private const string CAPITAL = "Abu Dhabi"; + private const string OFFICIAL_NAME = "United Arab Emirates"; + private const string ISO2_CODE = "AE"; + private const string ISO3_CODE = "ARE"; + private const int NUMERIC_CODE = 784; + private readonly string[] CALLING_CODE = ["+971"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.UnitedArabEmirates; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Abu Dhabi", "AE-AZ", "Emirate"), + ("Ajman", "AE-AJ", "Emirate"), + ("Dubai", "AE-DU", "Emirate"), + ("Fujairah", "AE-FU", "Emirate"), + ("Ras Al Khaimah", "AE-RK", "Emirate"), + ("Sharjah", "AE-SH", "Emirate"), + ("Umm Al Quwain", "AE-UQ", "Emirate") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForUAE() + { + 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/UnitedKingdomTest.cs b/src/World.Net.UnitTests/Countries/UnitedKingdomTest.cs new file mode 100644 index 0000000..b739561 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/UnitedKingdomTest.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class UnitedKingdomTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "United Kingdom"; + private const string NATIVE_NAME = "United Kingdom"; + private const string CAPITAL = "London"; + private const string OFFICIAL_NAME = "United Kingdom of Great Britain and Northern Ireland"; + private const string ISO2_CODE = "GB"; + private const string ISO3_CODE = "GBR"; + private const int NUMERIC_CODE = 826; + private readonly string[] CALLING_CODE = ["+44"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.UnitedKingdom; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("England", "GB-ENG", "Country"), + ("Scotland", "GB-SCT", "Country"), + ("Wales", "GB-WLS", "Country"), + ("Northern Ireland", "GB-NIR", "Country") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForUnitedKingdom() + { + 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/UnitedStatesMinorOutlyingIslandsTest.cs b/src/World.Net.UnitTests/Countries/UnitedStatesMinorOutlyingIslandsTest.cs new file mode 100644 index 0000000..e105e1c --- /dev/null +++ b/src/World.Net.UnitTests/Countries/UnitedStatesMinorOutlyingIslandsTest.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 UnitedStatesMinorOutlyingIslandsTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "United States Minor Outlying Islands"; + private const string NATIVE_NAME = "United States Minor Outlying Islands"; + private const string CAPITAL = null; + private const string OFFICIAL_NAME = "United States Minor Outlying Islands"; + private const string ISO2_CODE = "UM"; + private const string ISO3_CODE = "UMI"; + private const int NUMERIC_CODE = 581; + private readonly string[] CALLING_CODE = ["+1"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.UnitedStatesMinorOutlyingIslands; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = Array.Empty<(string, string, string)>(); + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForUSMinorOutlyingIslands() + { + 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/UnitedStatesTest.cs b/src/World.Net.UnitTests/Countries/UnitedStatesTest.cs new file mode 100644 index 0000000..66ce117 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/UnitedStatesTest.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class UnitedStatesTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "United States"; + private const string NATIVE_NAME = "United States"; + private const string CAPITAL = "Washington, D.C."; + private const string OFFICIAL_NAME = "United States of America"; + private const string ISO2_CODE = "US"; + private const string ISO3_CODE = "USA"; + private const int NUMERIC_CODE = 840; + private readonly string[] CALLING_CODE = ["+1"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.UnitedStates; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Alabama", "US-AL", "State"), + ("Alaska", "US-AK", "State"), + ("Arizona", "US-AZ", "State"), + ("Arkansas", "US-AR", "State"), + ("California", "US-CA", "State"), + ("Colorado", "US-CO", "State"), + ("Connecticut", "US-CT", "State"), + ("Delaware", "US-DE", "State"), + ("Florida", "US-FL", "State"), + ("Georgia", "US-GA", "State"), + ("Hawaii", "US-HI", "State"), + ("Idaho", "US-ID", "State"), + ("Illinois", "US-IL", "State"), + ("Indiana", "US-IN", "State"), + ("Iowa", "US-IA", "State"), + ("Kansas", "US-KS", "State"), + ("Kentucky", "US-KY", "State"), + ("Louisiana", "US-LA", "State"), + ("Maine", "US-ME", "State"), + ("Maryland", "US-MD", "State"), + ("Massachusetts", "US-MA", "State"), + ("Michigan", "US-MI", "State"), + ("Minnesota", "US-MN", "State"), + ("Mississippi", "US-MS", "State"), + ("Missouri", "US-MO", "State"), + ("Montana", "US-MT", "State"), + ("Nebraska", "US-NE", "State"), + ("Nevada", "US-NV", "State"), + ("New Hampshire", "US-NH", "State"), + ("New Jersey", "US-NJ", "State"), + ("New Mexico", "US-NM", "State"), + ("New York", "US-NY", "State"), + ("North Carolina", "US-NC", "State"), + ("North Dakota", "US-ND", "State"), + ("Ohio", "US-OH", "State"), + ("Oklahoma", "US-OK", "State"), + ("Oregon", "US-OR", "State"), + ("Pennsylvania", "US-PA", "State"), + ("Rhode Island", "US-RI", "State"), + ("South Carolina", "US-SC", "State"), + ("South Dakota", "US-SD", "State"), + ("Tennessee", "US-TN", "State"), + ("Texas", "US-TX", "State"), + ("Utah", "US-UT", "State"), + ("Vermont", "US-VT", "State"), + ("Virginia", "US-VA", "State"), + ("Washington", "US-WA", "State"), + ("West Virginia", "US-WV", "State"), + ("Wisconsin", "US-WI", "State"), + ("Wyoming", "US-WY", "State"), + ("District of Columbia", "US-DC", "Federal District") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForUnitedStates() + { + 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/UruguayTest.cs b/src/World.Net.UnitTests/Countries/UruguayTest.cs new file mode 100644 index 0000000..c5e6a9c --- /dev/null +++ b/src/World.Net.UnitTests/Countries/UruguayTest.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class UruguayTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Uruguay"; + private const string NATIVE_NAME = "República Oriental del Uruguay"; + private const string CAPITAL = "Montevideo"; + private const string OFFICIAL_NAME = "Oriental Republic of Uruguay"; + private const string ISO2_CODE = "UY"; + private const string ISO3_CODE = "URY"; + private const int NUMERIC_CODE = 858; + private readonly string[] CALLING_CODE = ["+598"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Uruguay; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Artigas", "UY-AR", "Department"), + ("Canelones", "UY-CA", "Department"), + ("Cerro Largo", "UY-CL", "Department"), + ("Colonia", "UY-CO", "Department"), + ("Durazno", "UY-DU", "Department"), + ("Flores", "UY-FS", "Department"), + ("Florida", "UY-FD", "Department"), + ("Lavalleja", "UY-LA", "Department"), + ("Maldonado", "UY-MA", "Department"), + ("Montevideo", "UY-MO", "Department"), + ("Paysandú", "UY-PA", "Department"), + ("Río Negro", "UY-RN", "Department"), + ("Rivera", "UY-RV", "Department"), + ("Rocha", "UY-RO", "Department"), + ("Salto", "UY-SA", "Department"), + ("San José", "UY-SJ", "Department"), + ("Soriano", "UY-SO", "Department"), + ("Tacuarembó", "UY-TA", "Department"), + ("Treinta y Tres", "UY-TT", "Department") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForUruguay() + { + 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/UzbekistanTest.cs b/src/World.Net.UnitTests/Countries/UzbekistanTest.cs new file mode 100644 index 0000000..f636507 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/UzbekistanTest.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class UzbekistanTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Uzbekistan"; + private const string NATIVE_NAME = "Oʻzbekiston Respublikasi"; + private const string CAPITAL = "Tashkent"; + private const string OFFICIAL_NAME = "Republic of Uzbekistan"; + private const string ISO2_CODE = "UZ"; + private const string ISO3_CODE = "UZB"; + private const int NUMERIC_CODE = 860; + private readonly string[] CALLING_CODE = ["+998"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Uzbekistan; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Andijan", "UZ-AN", "Region"), + ("Bukhara", "UZ-BU", "Region"), + ("Fergana", "UZ-FA", "Region"), + ("Jizzakh", "UZ-JI", "Region"), + ("Kashkadarya", "UZ-KA", "Region"), + ("Khorezm", "UZ-KH", "Region"), + ("Namangan", "UZ-NG", "Region"), + ("Navoiy", "UZ-NW", "Region"), + ("Samarkand", "UZ-SA", "Region"), + ("Sirdaryo", "UZ-SI", "Region"), + ("Surxondaryo", "UZ-SU", "Region"), + ("Tashkent Region", "UZ-TO", "Region"), + ("Republic of Karakalpakstan", "UZ-QA", "Autonomous Republic"), + ("Tashkent", "UZ-TK", "City") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForUzbekistan() + { + 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/VanuatuTest.cs b/src/World.Net.UnitTests/Countries/VanuatuTest.cs new file mode 100644 index 0000000..df0bbad --- /dev/null +++ b/src/World.Net.UnitTests/Countries/VanuatuTest.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class VanuatuTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Vanuatu"; + private const string NATIVE_NAME = "Ripablik blong Vanuatu"; + private const string CAPITAL = "Port Vila"; + private const string OFFICIAL_NAME = "Republic of Vanuatu"; + private const string ISO2_CODE = "VU"; + private const string ISO3_CODE = "VUT"; + private const int NUMERIC_CODE = 548; + private readonly string[] CALLING_CODE = ["+678"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Vanuatu; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Malampa", "VU-MAP", "Province"), + ("Penama", "VU-PAM", "Province"), + ("Sanma", "VU-SAM", "Province"), + ("Shefa", "VU-SEE", "Province"), + ("Tafea", "VU-TAE", "Province"), + ("Torba", "VU-TOB", "Province") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForVanuatu() + { + 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/VaticanCityTest.cs b/src/World.Net.UnitTests/Countries/VaticanCityTest.cs new file mode 100644 index 0000000..a41600f --- /dev/null +++ b/src/World.Net.UnitTests/Countries/VaticanCityTest.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 VaticanCityTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Vatican City State (Holy See)"; + private const string NATIVE_NAME = "Stato della Città del Vaticano"; + private const string CAPITAL = "Vatican City"; + private const string OFFICIAL_NAME = "Vatican City State"; + private const string ISO2_CODE = "VA"; + private const string ISO3_CODE = "VAT"; + private const int NUMERIC_CODE = 336; + private readonly string[] CALLING_CODE = ["+379"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.VaticanCityState; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = Array.Empty<(string, string, string)>(); + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForVaticanCity() + { + 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/VenezuelaTest.cs b/src/World.Net.UnitTests/Countries/VenezuelaTest.cs new file mode 100644 index 0000000..76d2c94 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/VenezuelaTest.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class VenezuelaTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Venezuela"; + private const string NATIVE_NAME = "República Bolivariana de Venezuela"; + private const string CAPITAL = "Caracas"; + private const string OFFICIAL_NAME = "Bolivarian Republic of Venezuela"; + private const string ISO2_CODE = "VE"; + private const string ISO3_CODE = "VEN"; + private const int NUMERIC_CODE = 862; + private readonly string[] CALLING_CODE = ["+58"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Venezuela; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Amazonas", "VE-Z", "State"), + ("Anzoátegui", "VE-B", "State"), + ("Apure", "VE-C", "State"), + ("Aragua", "VE-D", "State"), + ("Barinas", "VE-E", "State"), + ("Bolívar", "VE-F", "State"), + ("Carabobo", "VE-G", "State"), + ("Cojedes", "VE-H", "State"), + ("Delta Amacuro", "VE-Y", "State"), + ("Falcón", "VE-I", "State"), + ("Guárico", "VE-J", "State"), + ("Lara", "VE-K", "State"), + ("Mérida", "VE-L", "State"), + ("Miranda", "VE-M", "State"), + ("Monagas", "VE-N", "State"), + ("Nueva Esparta", "VE-O", "State"), + ("Portuguesa", "VE-P", "State"), + ("Sucre", "VE-R", "State"), + ("Táchira", "VE-S", "State"), + ("Trujillo", "VE-T", "State"), + ("Vargas", "VE-X", "State"), + ("Yaracuy", "VE-U", "State"), + ("Zulia", "VE-V", "State"), + ("Capital District", "VE-DC", "Capital District") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForVenezuela() + { + 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/VietnamTest.cs b/src/World.Net.UnitTests/Countries/VietnamTest.cs new file mode 100644 index 0000000..59cb946 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/VietnamTest.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class VietnamTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Vietnam"; + private const string NATIVE_NAME = "Cộng hòa Xã hội Chủ nghĩa Việt Nam"; + private const string CAPITAL = "Hanoi"; + private const string OFFICIAL_NAME = "Socialist Republic of Vietnam"; + private const string ISO2_CODE = "VN"; + private const string ISO3_CODE = "VNM"; + private const int NUMERIC_CODE = 704; + private readonly string[] CALLING_CODE = ["+84"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Vietnam; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("An Giang", "VN-44", "Province"), + ("Bà Rịa–Vũng Tàu", "VN-43", "Province"), + ("Bắc Giang", "VN-54", "Province"), + ("Bắc Kạn", "VN-53", "Province"), + ("Bạc Liêu", "VN-50", "Province"), + ("Bắc Ninh", "VN-56", "Province"), + ("Bến Tre", "VN-51", "Province"), + ("Bình Định", "VN-31", "Province"), + ("Bình Dương", "VN-74", "Province"), + ("Bình Phước", "VN-70", "Province"), + ("Bình Thuận", "VN-40", "Province"), + ("Cà Mau", "VN-49", "Province"), + ("Cần Thơ", "VN-CT", "Municipality"), + ("Cao Bằng", "VN-04", "Province"), + ("Đà Nẵng", "VN-DN", "Municipality"), + ("Đắk Lắk", "VN-33", "Province"), + ("Đắk Nông", "VN-72", "Province"), + ("Điện Biên", "VN-11", "Province"), + ("Đồng Nai", "VN-75", "Province"), + ("Đồng Tháp", "VN-67", "Province"), + ("Gia Lai", "VN-30", "Province"), + ("Hà Giang", "VN-02", "Province"), + ("Hà Nam", "VN-63", "Province"), + ("Hà Nội", "VN-HN", "Municipality"), + ("Hà Tĩnh", "VN-24", "Province"), + ("Hải Dương", "VN-61", "Province"), + ("Hải Phòng", "VN-HP", "Municipality"), + ("Hậu Giang", "VN-64", "Province"), + ("Hòa Bình", "VN-14", "Province"), + ("Hưng Yên", "VN-66", "Province"), + ("Khánh Hòa", "VN-34", "Province"), + ("Kiên Giang", "VN-47", "Province"), + ("Kon Tum", "VN-28", "Province"), + ("Lai Châu", "VN-12", "Province"), + ("Lâm Đồng", "VN-35", "Province"), + ("Lạng Sơn", "VN-20", "Province"), + ("Lào Cai", "VN-10", "Province"), + ("Long An", "VN-41", "Province"), + ("Nam Định", "VN-67", "Province"), + ("Nghệ An", "VN-28", "Province"), + ("Ninh Bình", "VN-18", "Province"), + ("Ninh Thuận", "VN-36", "Province"), + ("Phú Thọ", "VN-68", "Province"), + ("Phú Yên", "VN-32", "Province"), + ("Quảng Bình", "VN-23", "Province"), + ("Quảng Nam", "VN-27", "Province"), + ("Quảng Ngãi", "VN-29", "Province"), + ("Quảng Ninh", "VN-22", "Province"), + ("Quảng Trị", "VN-25", "Province"), + ("Sóc Trăng", "VN-52", "Province"), + ("Sơn La", "VN-15", "Province"), + ("Tây Ninh", "VN-37", "Province"), + ("Thái Bình", "VN-60", "Province"), + ("Thái Nguyên", "VN-19", "Province"), + ("Thanh Hóa", "VN-21", "Province"), + ("Thừa Thiên–Huế", "VN-26", "Province"), + ("Tiền Giang", "VN-42", "Province"), + ("TP Hồ Chí Minh", "VN-HCM", "Municipality"), + ("Trà Vinh", "VN-48", "Province"), + ("Tuyên Quang", "VN-07", "Province"), + ("Vĩnh Long", "VN-45", "Province"), + ("Vĩnh Phúc", "VN-58", "Province"), + ("Yên Bái", "VN-06", "Province") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForVietnam() + { + 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/VirginIslandsBritishTest.cs b/src/World.Net.UnitTests/Countries/VirginIslandsBritishTest.cs new file mode 100644 index 0000000..6cff61e --- /dev/null +++ b/src/World.Net.UnitTests/Countries/VirginIslandsBritishTest.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 VirginIslandsBritishTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Virgin Islands (British)"; + private const string NATIVE_NAME = "British Virgin Islands"; + private const string CAPITAL = "Road Town"; + private const string OFFICIAL_NAME = "British Virgin Islands"; + private const string ISO2_CODE = "VG"; + private const string ISO3_CODE = "VGB"; + private const int NUMERIC_CODE = 92; + private readonly string[] CALLING_CODE = ["+1-284"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.VirginIslandsBritish; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = Array.Empty<(string, string, string)>(); + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForVirginIslandsBritish() + { + 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/VirginIslandsUSTest.cs b/src/World.Net.UnitTests/Countries/VirginIslandsUSTest.cs new file mode 100644 index 0000000..26960c6 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/VirginIslandsUSTest.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 VirginIslandsUSTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Virgin Islands (US)"; + private const string NATIVE_NAME = "United States Virgin Islands"; + private const string CAPITAL = "Charlotte Amalie"; + private const string OFFICIAL_NAME = "United States Virgin Islands"; + private const string ISO2_CODE = "VI"; + private const string ISO3_CODE = "VIR"; + private const int NUMERIC_CODE = 850; + private readonly string[] CALLING_CODE = ["+1-340"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.VirginIslandsUS; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = Array.Empty<(string, string, string)>(); + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForVirginIslandsUS() + { + 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/WallisAndFutunaTest.cs b/src/World.Net.UnitTests/Countries/WallisAndFutunaTest.cs new file mode 100644 index 0000000..19cdfcf --- /dev/null +++ b/src/World.Net.UnitTests/Countries/WallisAndFutunaTest.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class WallisAndFutunaTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Wallis and Futuna"; + private const string NATIVE_NAME = "Wallis et Futuna"; + private const string CAPITAL = "Mata-Utu"; + private const string OFFICIAL_NAME = "Territory of the Wallis and Futuna Islands"; + private const string ISO2_CODE = "WF"; + private const string ISO3_CODE = "WLF"; + private const int NUMERIC_CODE = 876; + private readonly string[] CALLING_CODE = ["+681"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.WallisAndFutunaIslands; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Alo", "WF-AL", "District"), + ("Sigave", "WF-SG", "District"), + ("Uvea", "WF-UV", "District") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForWallisAndFutuna() + { + 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/WesternSaharaTest.cs b/src/World.Net.UnitTests/Countries/WesternSaharaTest.cs new file mode 100644 index 0000000..c8f8078 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/WesternSaharaTest.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 WesternSaharaTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Western Sahara"; + private const string NATIVE_NAME = "الصحراء الغربية"; + private const string CAPITAL = "El Aaiún"; + private const string OFFICIAL_NAME = "Sahrawi Arab Democratic Republic"; + private const string ISO2_CODE = "EH"; + private const string ISO3_CODE = "ESH"; + private const int NUMERIC_CODE = 732; + private readonly string[] CALLING_CODE = ["+212"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.WesternSahara; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = Array.Empty<(string, string, string)>(); + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForWesternSahara() + { + 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/YemenTest.cs b/src/World.Net.UnitTests/Countries/YemenTest.cs new file mode 100644 index 0000000..bbfd18b --- /dev/null +++ b/src/World.Net.UnitTests/Countries/YemenTest.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class YemenTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Yemen"; + private const string NATIVE_NAME = "الجمهورية اليمنية"; + private const string CAPITAL = "Sana’a"; + private const string OFFICIAL_NAME = "Republic of Yemen"; + private const string ISO2_CODE = "YE"; + private const string ISO3_CODE = "YEM"; + private const int NUMERIC_CODE = 887; + private readonly string[] CALLING_CODE = ["+967"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Yemen; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Abyan", "YE-AB", "Governorate"), + ("Aden", "YE-AD", "Governorate"), + ("Al Bayda", "YE-BD", "Governorate"), + ("Al Hudaydah", "YE-HD", "Governorate"), + ("Al Jawf", "YE-JW", "Governorate"), + ("Al Mahrah", "YE-MR", "Governorate"), + ("Al Mahwit", "YE-MW", "Governorate"), + ("Amran", "YE-AM", "Governorate"), + ("Dhamar", "YE-DH", "Governorate"), + ("Hadhramaut", "YE-HU", "Governorate"), + ("Hajjah", "YE-HJ", "Governorate"), + ("Ibb", "YE-IB", "Governorate"), + ("Lahij", "YE-LH", "Governorate"), + ("Ma’rib", "YE-MA", "Governorate"), + ("Raymah", "YE-RH", "Governorate"), + ("Sa’dah", "YE-SD", "Governorate"), + ("Sana’a", "YE-SN", "Governorate"), + ("Shabwah", "YE-SH", "Governorate"), + ("Socotra", "YE-SS", "Governorate"), + ("Ta’izz", "YE-TA", "Governorate") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForYemen() + { + 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/ZambiaTest.cs b/src/World.Net.UnitTests/Countries/ZambiaTest.cs new file mode 100644 index 0000000..68eea0c --- /dev/null +++ b/src/World.Net.UnitTests/Countries/ZambiaTest.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class ZambiaTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Zambia"; + private const string NATIVE_NAME = "Republic of Zambia"; + private const string CAPITAL = "Lusaka"; + private const string OFFICIAL_NAME = "Republic of Zambia"; + private const string ISO2_CODE = "ZM"; + private const string ISO3_CODE = "ZMB"; + private const int NUMERIC_CODE = 894; + private readonly string[] CALLING_CODE = ["+260"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Zambia; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Central", "ZM-02", "Province"), + ("Copperbelt", "ZM-08", "Province"), + ("Eastern", "ZM-03", "Province"), + ("Luapula", "ZM-04", "Province"), + ("Lusaka", "ZM-09", "Province"), + ("Muchinga", "ZM-13", "Province"), + ("Northern", "ZM-05", "Province"), + ("North-Western", "ZM-06", "Province"), + ("Southern", "ZM-07", "Province"), + ("Western", "ZM-01", "Province") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForZambia() + { + 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/ZimbabweTest.cs b/src/World.Net.UnitTests/Countries/ZimbabweTest.cs new file mode 100644 index 0000000..5fad5a0 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/ZimbabweTest.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class ZimbabweTest : AssertCountryTestBase + { + private const string COUNTRY_NAME = "Zimbabwe"; + private const string NATIVE_NAME = "Republic of Zimbabwe"; + private const string CAPITAL = "Harare"; + private const string OFFICIAL_NAME = "Republic of Zimbabwe"; + private const string ISO2_CODE = "ZW"; + private const string ISO3_CODE = "ZWE"; + private const int NUMERIC_CODE = 716; + private readonly string[] CALLING_CODE = ["+263"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Zimbabwe; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + { + ("Bulawayo", "ZW-BU", "Province"), + ("Harare", "ZW-HA", "Province"), + ("Manicaland", "ZW-MA", "Province"), + ("Mashonaland Central", "ZW-MC", "Province"), + ("Mashonaland East", "ZW-ME", "Province"), + ("Mashonaland West", "ZW-MW", "Province"), + ("Masvingo", "ZW-MV", "Province"), + ("Matabeleland North", "ZW-MN", "Province"), + ("Matabeleland South", "ZW-MS", "Province"), + ("Midlands", "ZW-MI", "Province") + }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForZimbabwe() + { + 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/Uganda.cs b/src/World.Net/Countries/Uganda.cs new file mode 100644 index 0000000..f74020f --- /dev/null +++ b/src/World.Net/Countries/Uganda.cs @@ -0,0 +1,31 @@ +namespace World.Net.Countries; + +internal sealed class Uganda : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Uganda; + + public string Name { get; } = "Uganda"; + + public string OfficialName { get; } = "Republic of Uganda"; + + public string NativeName => "Uganda"; + + public string Capital { get; } = "Kampala"; + + public int NumericCode { get; } = 800; + + public string ISO2Code { get; } = "UG"; + + public string ISO3Code { get; } = "UGA"; + + public string[] CallingCode { get; } = ["+256"]; + + public IEnumerable States => new[] + { + new State("Central", "UG-C", "Region"), + new State("Eastern", "UG-E", "Region"), + new State("Northern", "UG-N", "Region"), + new State("Western", "UG-W", "Region") + }; +} + diff --git a/src/World.Net/Countries/Ukraine.cs b/src/World.Net/Countries/Ukraine.cs new file mode 100644 index 0000000..d487a95 --- /dev/null +++ b/src/World.Net/Countries/Ukraine.cs @@ -0,0 +1,54 @@ +namespace World.Net.Countries; + +internal sealed class Ukraine : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Ukraine; + + public string Name { get; } = "Ukraine"; + + public string OfficialName { get; } = "Ukraine"; + + public string NativeName => "Україна"; + + public string Capital { get; } = "Kyiv"; + + public int NumericCode { get; } = 804; + + public string ISO2Code { get; } = "UA"; + + public string ISO3Code { get; } = "UKR"; + + public string[] CallingCode { get; } = ["+380"]; + + public IEnumerable States => new[] + { + new State("Cherkasy", "UA-CK", "Oblast"), + new State("Chernihiv", "UA-CH", "Oblast"), + new State("Chernivtsi", "UA-CV", "Oblast"), + new State("Dnipropetrovsk", "UA-DP", "Oblast"), + new State("Donetsk", "UA-DO", "Oblast"), + new State("Ivano-Frankivsk", "UA-IF", "Oblast"), + new State("Kharkiv", "UA-KH", "Oblast"), + new State("Kherson", "UA-KH", "Oblast"), + new State("Khmelnytskyi", "UA-KM", "Oblast"), + new State("Kirovohrad", "UA-KR", "Oblast"), + new State("Kyiv", "UA-KY", "City"), + new State("Kyiv Oblast", "UA-KY", "Oblast"), + new State("Luhansk", "UA-LU", "Oblast"), + new State("Lviv", "UA-LV", "Oblast"), + new State("Mykolaiv", "UA-MK", "Oblast"), + new State("Odessa", "UA-OD", "Oblast"), + new State("Poltava", "UA-PL", "Oblast"), + new State("Rivne", "UA-RV", "Oblast"), + new State("Sevastopol", "UA-SE", "City"), + new State("Sumy", "UA-SU", "Oblast"), + new State("Ternopil", "UA-TE", "Oblast"), + new State("Vinnytsia", "UA-VI", "Oblast"), + new State("Volyn", "UA-VO", "Oblast"), + new State("Zakarpattia", "UA-ZA", "Oblast"), + new State("Zaporizhzhia", "UA-ZP", "Oblast"), + new State("Zhytomyr", "UA-ZH", "Oblast"), + new State("Autonomous Republic of Crimea", "UA-CR", "Autonomous Republic") + }; +} + diff --git a/src/World.Net/Countries/UnitedArabEmirates.cs b/src/World.Net/Countries/UnitedArabEmirates.cs new file mode 100644 index 0000000..6d1a018 --- /dev/null +++ b/src/World.Net/Countries/UnitedArabEmirates.cs @@ -0,0 +1,34 @@ +namespace World.Net.Countries; + +internal sealed class UnitedArabEmirates : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.UnitedArabEmirates; + + public string Name { get; } = "United Arab Emirates"; + + public string OfficialName { get; } = "United Arab Emirates"; + + public string NativeName => "الإمارات العربية المتحدة"; + + public string Capital { get; } = "Abu Dhabi"; + + public int NumericCode { get; } = 784; + + public string ISO2Code { get; } = "AE"; + + public string ISO3Code { get; } = "ARE"; + + public string[] CallingCode { get; } = ["+971"]; + + public IEnumerable States => new[] + { + new State("Abu Dhabi", "AE-AZ", "Emirate"), + new State("Ajman", "AE-AJ", "Emirate"), + new State("Dubai", "AE-DU", "Emirate"), + new State("Fujairah", "AE-FU", "Emirate"), + new State("Ras Al Khaimah", "AE-RK", "Emirate"), + new State("Sharjah", "AE-SH", "Emirate"), + new State("Umm Al Quwain", "AE-UQ", "Emirate") + }; +} + diff --git a/src/World.Net/Countries/UnitedKingdom.cs b/src/World.Net/Countries/UnitedKingdom.cs new file mode 100644 index 0000000..7c0c7d4 --- /dev/null +++ b/src/World.Net/Countries/UnitedKingdom.cs @@ -0,0 +1,31 @@ +namespace World.Net.Countries; + +internal sealed class UnitedKingdom : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.UnitedKingdom; + + public string Name { get; } = "United Kingdom"; + + public string OfficialName { get; } = "United Kingdom of Great Britain and Northern Ireland"; + + public string NativeName => "United Kingdom"; + + public string Capital { get; } = "London"; + + public int NumericCode { get; } = 826; + + public string ISO2Code { get; } = "GB"; + + public string ISO3Code { get; } = "GBR"; + + public string[] CallingCode { get; } = ["+44"]; + + public IEnumerable States => new[] + { + new State("England", "GB-ENG", "Country"), + new State("Scotland", "GB-SCT", "Country"), + new State("Wales", "GB-WLS", "Country"), + new State("Northern Ireland", "GB-NIR", "Country") + }; +} + diff --git a/src/World.Net/Countries/UnitedStates.cs b/src/World.Net/Countries/UnitedStates.cs new file mode 100644 index 0000000..1eec24d --- /dev/null +++ b/src/World.Net/Countries/UnitedStates.cs @@ -0,0 +1,78 @@ +namespace World.Net.Countries; + +internal sealed class UnitedStates : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.UnitedStates; + + public string Name { get; } = "United States"; + + public string OfficialName { get; } = "United States of America"; + + public string NativeName => "United States"; + + public string Capital { get; } = "Washington, D.C."; + + public int NumericCode { get; } = 840; + + public string ISO2Code { get; } = "US"; + + public string ISO3Code { get; } = "USA"; + + public string[] CallingCode { get; } = ["+1"]; + + public IEnumerable States => new[] + { + new State("Alabama", "US-AL", "State"), + new State("Alaska", "US-AK", "State"), + new State("Arizona", "US-AZ", "State"), + new State("Arkansas", "US-AR", "State"), + new State("California", "US-CA", "State"), + new State("Colorado", "US-CO", "State"), + new State("Connecticut", "US-CT", "State"), + new State("Delaware", "US-DE", "State"), + new State("Florida", "US-FL", "State"), + new State("Georgia", "US-GA", "State"), + new State("Hawaii", "US-HI", "State"), + new State("Idaho", "US-ID", "State"), + new State("Illinois", "US-IL", "State"), + new State("Indiana", "US-IN", "State"), + new State("Iowa", "US-IA", "State"), + new State("Kansas", "US-KS", "State"), + new State("Kentucky", "US-KY", "State"), + new State("Louisiana", "US-LA", "State"), + new State("Maine", "US-ME", "State"), + new State("Maryland", "US-MD", "State"), + new State("Massachusetts", "US-MA", "State"), + new State("Michigan", "US-MI", "State"), + new State("Minnesota", "US-MN", "State"), + new State("Mississippi", "US-MS", "State"), + new State("Missouri", "US-MO", "State"), + new State("Montana", "US-MT", "State"), + new State("Nebraska", "US-NE", "State"), + new State("Nevada", "US-NV", "State"), + new State("New Hampshire", "US-NH", "State"), + new State("New Jersey", "US-NJ", "State"), + new State("New Mexico", "US-NM", "State"), + new State("New York", "US-NY", "State"), + new State("North Carolina", "US-NC", "State"), + new State("North Dakota", "US-ND", "State"), + new State("Ohio", "US-OH", "State"), + new State("Oklahoma", "US-OK", "State"), + new State("Oregon", "US-OR", "State"), + new State("Pennsylvania", "US-PA", "State"), + new State("Rhode Island", "US-RI", "State"), + new State("South Carolina", "US-SC", "State"), + new State("South Dakota", "US-SD", "State"), + new State("Tennessee", "US-TN", "State"), + new State("Texas", "US-TX", "State"), + new State("Utah", "US-UT", "State"), + new State("Vermont", "US-VT", "State"), + new State("Virginia", "US-VA", "State"), + new State("Washington", "US-WA", "State"), + new State("West Virginia", "US-WV", "State"), + new State("Wisconsin", "US-WI", "State"), + new State("Wyoming", "US-WY", "State"), + new State("District of Columbia", "US-DC", "Federal District") + }; +} + diff --git a/src/World.Net/Countries/UnitedStatesMinorOutlyingIslands.cs b/src/World.Net/Countries/UnitedStatesMinorOutlyingIslands.cs new file mode 100644 index 0000000..07c383d --- /dev/null +++ b/src/World.Net/Countries/UnitedStatesMinorOutlyingIslands.cs @@ -0,0 +1,24 @@ +namespace World.Net.Countries; + +internal sealed class UnitedStatesMinorOutlyingIslands : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.UnitedStatesMinorOutlyingIslands; + + public string Name { get; } = "United States Minor Outlying Islands"; + + public string OfficialName { get; } = "United States Minor Outlying Islands"; + + public string NativeName => "United States Minor Outlying Islands"; + + public string Capital { get; } = null; + + public int NumericCode { get; } = 581; + + public string ISO2Code { get; } = "UM"; + + public string ISO3Code { get; } = "UMI"; + + public string[] CallingCode { get; } = ["+1"]; + + public IEnumerable States => Array.Empty(); +} diff --git a/src/World.Net/Countries/Uruguay.cs b/src/World.Net/Countries/Uruguay.cs new file mode 100644 index 0000000..25ecec3 --- /dev/null +++ b/src/World.Net/Countries/Uruguay.cs @@ -0,0 +1,46 @@ +namespace World.Net.Countries; + +internal sealed class Uruguay : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Uruguay; + + public string Name { get; } = "Uruguay"; + + public string OfficialName { get; } = "Oriental Republic of Uruguay"; + + public string NativeName => "República Oriental del Uruguay"; + + public string Capital { get; } = "Montevideo"; + + public int NumericCode { get; } = 858; + + public string ISO2Code { get; } = "UY"; + + public string ISO3Code { get; } = "URY"; + + public string[] CallingCode { get; } = ["+598"]; + + public IEnumerable States => new[] + { + new State("Artigas", "UY-AR", "Department"), + new State("Canelones", "UY-CA", "Department"), + new State("Cerro Largo", "UY-CL", "Department"), + new State("Colonia", "UY-CO", "Department"), + new State("Durazno", "UY-DU", "Department"), + new State("Flores", "UY-FS", "Department"), + new State("Florida", "UY-FD", "Department"), + new State("Lavalleja", "UY-LA", "Department"), + new State("Maldonado", "UY-MA", "Department"), + new State("Montevideo", "UY-MO", "Department"), + new State("Paysandú", "UY-PA", "Department"), + new State("Río Negro", "UY-RN", "Department"), + new State("Rivera", "UY-RV", "Department"), + new State("Rocha", "UY-RO", "Department"), + new State("Salto", "UY-SA", "Department"), + new State("San José", "UY-SJ", "Department"), + new State("Soriano", "UY-SO", "Department"), + new State("Tacuarembó", "UY-TA", "Department"), + new State("Treinta y Tres", "UY-TT", "Department") + }; +} + diff --git a/src/World.Net/Countries/Uzbekistan.cs b/src/World.Net/Countries/Uzbekistan.cs new file mode 100644 index 0000000..8e375c4 --- /dev/null +++ b/src/World.Net/Countries/Uzbekistan.cs @@ -0,0 +1,41 @@ +namespace World.Net.Countries; + +internal sealed class Uzbekistan : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Uzbekistan; + + public string Name { get; } = "Uzbekistan"; + + public string OfficialName { get; } = "Republic of Uzbekistan"; + + public string NativeName => "Oʻzbekiston Respublikasi"; + + public string Capital { get; } = "Tashkent"; + + public int NumericCode { get; } = 860; + + public string ISO2Code { get; } = "UZ"; + + public string ISO3Code { get; } = "UZB"; + + public string[] CallingCode { get; } = ["+998"]; + + public IEnumerable States => new[] + { + new State("Andijan", "UZ-AN", "Region"), + new State("Bukhara", "UZ-BU", "Region"), + new State("Fergana", "UZ-FA", "Region"), + new State("Jizzakh", "UZ-JI", "Region"), + new State("Kashkadarya", "UZ-KA", "Region"), + new State("Khorezm", "UZ-KH", "Region"), + new State("Namangan", "UZ-NG", "Region"), + new State("Navoiy", "UZ-NW", "Region"), + new State("Samarkand", "UZ-SA", "Region"), + new State("Sirdaryo", "UZ-SI", "Region"), + new State("Surxondaryo", "UZ-SU", "Region"), + new State("Tashkent Region", "UZ-TO", "Region"), + new State("Republic of Karakalpakstan", "UZ-QA", "Autonomous Republic"), + new State("Tashkent", "UZ-TK", "City") + }; +} + diff --git a/src/World.Net/Countries/Vanuatu.cs b/src/World.Net/Countries/Vanuatu.cs new file mode 100644 index 0000000..5745d61 --- /dev/null +++ b/src/World.Net/Countries/Vanuatu.cs @@ -0,0 +1,33 @@ +namespace World.Net.Countries; + +internal sealed class Vanuatu : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Vanuatu; + + public string Name { get; } = "Vanuatu"; + + public string OfficialName { get; } = "Republic of Vanuatu"; + + public string NativeName => "Ripablik blong Vanuatu"; + + public string Capital { get; } = "Port Vila"; + + public int NumericCode { get; } = 548; + + public string ISO2Code { get; } = "VU"; + + public string ISO3Code { get; } = "VUT"; + + public string[] CallingCode { get; } = ["+678"]; + + public IEnumerable States => new[] + { + new State("Malampa", "VU-MAP", "Province"), + new State("Penama", "VU-PAM", "Province"), + new State("Sanma", "VU-SAM", "Province"), + new State("Shefa", "VU-SEE", "Province"), + new State("Tafea", "VU-TAE", "Province"), + new State("Torba", "VU-TOB", "Province") + }; +} + diff --git a/src/World.Net/Countries/VaticanCity.cs b/src/World.Net/Countries/VaticanCity.cs new file mode 100644 index 0000000..9e5b133 --- /dev/null +++ b/src/World.Net/Countries/VaticanCity.cs @@ -0,0 +1,25 @@ +namespace World.Net.Countries; + +internal sealed class VaticanCity : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.VaticanCityState; + + public string Name { get; } = "Vatican City State (Holy See)"; + + public string OfficialName { get; } = "Vatican City State"; + + public string NativeName => "Stato della Città del Vaticano"; + + public string Capital { get; } = "Vatican City"; + + public int NumericCode { get; } = 336; + + public string ISO2Code { get; } = "VA"; + + public string ISO3Code { get; } = "VAT"; + + public string[] CallingCode { get; } = ["+379"]; + + public IEnumerable States => Array.Empty(); +} + diff --git a/src/World.Net/Countries/Venezuela.cs b/src/World.Net/Countries/Venezuela.cs new file mode 100644 index 0000000..04d2165 --- /dev/null +++ b/src/World.Net/Countries/Venezuela.cs @@ -0,0 +1,50 @@ +namespace World.Net.Countries; + +internal sealed class Venezuela : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Venezuela; + + public string Name { get; } = "Venezuela"; + + public string OfficialName { get; } = "Bolivarian Republic of Venezuela"; + + public string NativeName => "República Bolivariana de Venezuela"; + + public string Capital { get; } = "Caracas"; + + public int NumericCode { get; } = 862; + + public string ISO2Code { get; } = "VE"; + + public string ISO3Code { get; } = "VEN"; + + public string[] CallingCode { get; } = ["+58"]; + + public IEnumerable States => new[] + { + new State("Amazonas", "VE-Z", "State"), + new State("Anzoátegui", "VE-B", "State"), + new State("Apure", "VE-C", "State"), + new State("Aragua", "VE-D", "State"), + new State("Barinas", "VE-E", "State"), + new State("Bolívar", "VE-F", "State"), + new State("Carabobo", "VE-G", "State"), + new State("Cojedes", "VE-H", "State"), + new State("Delta Amacuro", "VE-Y", "State"), + new State("Falcón", "VE-I", "State"), + new State("Guárico", "VE-J", "State"), + new State("Lara", "VE-K", "State"), + new State("Mérida", "VE-L", "State"), + new State("Miranda", "VE-M", "State"), + new State("Monagas", "VE-N", "State"), + new State("Nueva Esparta", "VE-O", "State"), + new State("Portuguesa", "VE-P", "State"), + new State("Sucre", "VE-R", "State"), + new State("Táchira", "VE-S", "State"), + new State("Trujillo", "VE-T", "State"), + new State("Vargas", "VE-X", "State"), + new State("Yaracuy", "VE-U", "State"), + new State("Zulia", "VE-V", "State"), + new State("Capital District", "VE-DC", "Capital District") + }; +} diff --git a/src/World.Net/Countries/Vietnam.cs b/src/World.Net/Countries/Vietnam.cs new file mode 100644 index 0000000..7530ce1 --- /dev/null +++ b/src/World.Net/Countries/Vietnam.cs @@ -0,0 +1,90 @@ +namespace World.Net.Countries; + +internal sealed class Vietnam : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Vietnam; + + public string Name { get; } = "Vietnam"; + + public string OfficialName { get; } = "Socialist Republic of Vietnam"; + + public string NativeName => "Cộng hòa Xã hội Chủ nghĩa Việt Nam"; + + public string Capital { get; } = "Hanoi"; + + public int NumericCode { get; } = 704; + + public string ISO2Code { get; } = "VN"; + + public string ISO3Code { get; } = "VNM"; + + public string[] CallingCode { get; } = ["+84"]; + + public IEnumerable States => new[] + { + new State("An Giang", "VN-44", "Province"), + new State("Bà Rịa–Vũng Tàu", "VN-43", "Province"), + new State("Bắc Giang", "VN-54", "Province"), + new State("Bắc Kạn", "VN-53", "Province"), + new State("Bạc Liêu", "VN-50", "Province"), + new State("Bắc Ninh", "VN-56", "Province"), + new State("Bến Tre", "VN-51", "Province"), + new State("Bình Định", "VN-31", "Province"), + new State("Bình Dương", "VN-74", "Province"), + new State("Bình Phước", "VN-70", "Province"), + new State("Bình Thuận", "VN-40", "Province"), + new State("Cà Mau", "VN-49", "Province"), + new State("Cần Thơ", "VN-CT", "Municipality"), + new State("Cao Bằng", "VN-04", "Province"), + new State("Đà Nẵng", "VN-DN", "Municipality"), + new State("Đắk Lắk", "VN-33", "Province"), + new State("Đắk Nông", "VN-72", "Province"), + new State("Điện Biên", "VN-11", "Province"), + new State("Đồng Nai", "VN-75", "Province"), + new State("Đồng Tháp", "VN-67", "Province"), + new State("Gia Lai", "VN-30", "Province"), + new State("Hà Giang", "VN-02", "Province"), + new State("Hà Nam", "VN-63", "Province"), + new State("Hà Nội", "VN-HN", "Municipality"), + new State("Hà Tĩnh", "VN-24", "Province"), + new State("Hải Dương", "VN-61", "Province"), + new State("Hải Phòng", "VN-HP", "Municipality"), + new State("Hậu Giang", "VN-64", "Province"), + new State("Hòa Bình", "VN-14", "Province"), + new State("Hưng Yên", "VN-66", "Province"), + new State("Khánh Hòa", "VN-34", "Province"), + new State("Kiên Giang", "VN-47", "Province"), + new State("Kon Tum", "VN-28", "Province"), + new State("Lai Châu", "VN-12", "Province"), + new State("Lâm Đồng", "VN-35", "Province"), + new State("Lạng Sơn", "VN-20", "Province"), + new State("Lào Cai", "VN-10", "Province"), + new State("Long An", "VN-41", "Province"), + new State("Nam Định", "VN-67", "Province"), + new State("Nghệ An", "VN-28", "Province"), + new State("Ninh Bình", "VN-18", "Province"), + new State("Ninh Thuận", "VN-36", "Province"), + new State("Phú Thọ", "VN-68", "Province"), + new State("Phú Yên", "VN-32", "Province"), + new State("Quảng Bình", "VN-23", "Province"), + new State("Quảng Nam", "VN-27", "Province"), + new State("Quảng Ngãi", "VN-29", "Province"), + new State("Quảng Ninh", "VN-22", "Province"), + new State("Quảng Trị", "VN-25", "Province"), + new State("Sóc Trăng", "VN-52", "Province"), + new State("Sơn La", "VN-15", "Province"), + new State("Tây Ninh", "VN-37", "Province"), + new State("Thái Bình", "VN-60", "Province"), + new State("Thái Nguyên", "VN-19", "Province"), + new State("Thanh Hóa", "VN-21", "Province"), + new State("Thừa Thiên–Huế", "VN-26", "Province"), + new State("Tiền Giang", "VN-42", "Province"), + new State("TP Hồ Chí Minh", "VN-HCM", "Municipality"), + new State("Trà Vinh", "VN-48", "Province"), + new State("Tuyên Quang", "VN-07", "Province"), + new State("Vĩnh Long", "VN-45", "Province"), + new State("Vĩnh Phúc", "VN-58", "Province"), + new State("Yên Bái", "VN-06", "Province") + }; +} + diff --git a/src/World.Net/Countries/VirginIslandsBritish.cs b/src/World.Net/Countries/VirginIslandsBritish.cs new file mode 100644 index 0000000..05140ca --- /dev/null +++ b/src/World.Net/Countries/VirginIslandsBritish.cs @@ -0,0 +1,24 @@ +namespace World.Net.Countries; + +internal sealed class VirginIslandsBritish : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.VirginIslandsBritish; + + public string Name { get; } = "Virgin Islands (British)"; + + public string OfficialName { get; } = "British Virgin Islands"; + + public string NativeName => "British Virgin Islands"; + + public string Capital { get; } = "Road Town"; + + public int NumericCode { get; } = 92; + + public string ISO2Code { get; } = "VG"; + + public string ISO3Code { get; } = "VGB"; + + public string[] CallingCode { get; } = ["+1-284"]; + + public IEnumerable States => Array.Empty(); +} diff --git a/src/World.Net/Countries/VirginIslandsUS.cs b/src/World.Net/Countries/VirginIslandsUS.cs new file mode 100644 index 0000000..480f6a9 --- /dev/null +++ b/src/World.Net/Countries/VirginIslandsUS.cs @@ -0,0 +1,25 @@ +namespace World.Net.Countries; + +internal sealed class VirginIslandsUS : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.VirginIslandsUS; + + public string Name { get; } = "Virgin Islands (US)"; + + public string OfficialName { get; } = "United States Virgin Islands"; + + public string NativeName => "United States Virgin Islands"; + + public string Capital { get; } = "Charlotte Amalie"; + + public int NumericCode { get; } = 850; + + public string ISO2Code { get; } = "VI"; + + public string ISO3Code { get; } = "VIR"; + + public string[] CallingCode { get; } = ["+1-340"]; + + public IEnumerable States => Array.Empty(); +} + diff --git a/src/World.Net/Countries/WallisAndFutuna.cs b/src/World.Net/Countries/WallisAndFutuna.cs new file mode 100644 index 0000000..c1b9dfa --- /dev/null +++ b/src/World.Net/Countries/WallisAndFutuna.cs @@ -0,0 +1,30 @@ +namespace World.Net.Countries; + +internal sealed class WallisAndFutuna : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.WallisAndFutunaIslands; + + public string Name { get; } = "Wallis and Futuna"; + + public string OfficialName { get; } = "Territory of the Wallis and Futuna Islands"; + + public string NativeName => "Wallis et Futuna"; + + public string Capital { get; } = "Mata-Utu"; + + public int NumericCode { get; } = 876; + + public string ISO2Code { get; } = "WF"; + + public string ISO3Code { get; } = "WLF"; + + public string[] CallingCode { get; } = ["+681"]; + + public IEnumerable States => new[] + { + new State("Alo", "WF-AL", "District"), + new State("Sigave", "WF-SG", "District"), + new State("Uvea", "WF-UV", "District") + }; +} + diff --git a/src/World.Net/Countries/WesternSahara.cs b/src/World.Net/Countries/WesternSahara.cs new file mode 100644 index 0000000..0addf42 --- /dev/null +++ b/src/World.Net/Countries/WesternSahara.cs @@ -0,0 +1,25 @@ +namespace World.Net.Countries; + +internal sealed class WesternSahara : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.WesternSahara; + + public string Name { get; } = "Western Sahara"; + + public string OfficialName { get; } = "Sahrawi Arab Democratic Republic"; + + public string NativeName => "الصحراء الغربية"; + + public string Capital { get; } = "El Aaiún"; + + public int NumericCode { get; } = 732; + + public string ISO2Code { get; } = "EH"; + + public string ISO3Code { get; } = "ESH"; + + public string[] CallingCode { get; } = ["+212"]; + + public IEnumerable States => Array.Empty(); +} + diff --git a/src/World.Net/Countries/Yemen.cs b/src/World.Net/Countries/Yemen.cs new file mode 100644 index 0000000..cc453f5 --- /dev/null +++ b/src/World.Net/Countries/Yemen.cs @@ -0,0 +1,47 @@ +namespace World.Net.Countries; + +internal sealed class Yemen : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Yemen; + + public string Name { get; } = "Yemen"; + + public string OfficialName { get; } = "Republic of Yemen"; + + public string NativeName => "الجمهورية اليمنية"; + + public string Capital { get; } = "Sana’a"; + + public int NumericCode { get; } = 887; + + public string ISO2Code { get; } = "YE"; + + public string ISO3Code { get; } = "YEM"; + + public string[] CallingCode { get; } = ["+967"]; + + public IEnumerable States => new[] + { + new State("Abyan", "YE-AB", "Governorate"), + new State("Aden", "YE-AD", "Governorate"), + new State("Al Bayda", "YE-BD", "Governorate"), + new State("Al Hudaydah", "YE-HD", "Governorate"), + new State("Al Jawf", "YE-JW", "Governorate"), + new State("Al Mahrah", "YE-MR", "Governorate"), + new State("Al Mahwit", "YE-MW", "Governorate"), + new State("Amran", "YE-AM", "Governorate"), + new State("Dhamar", "YE-DH", "Governorate"), + new State("Hadhramaut", "YE-HU", "Governorate"), + new State("Hajjah", "YE-HJ", "Governorate"), + new State("Ibb", "YE-IB", "Governorate"), + new State("Lahij", "YE-LH", "Governorate"), + new State("Ma’rib", "YE-MA", "Governorate"), + new State("Raymah", "YE-RH", "Governorate"), + new State("Sa’dah", "YE-SD", "Governorate"), + new State("Sana’a", "YE-SN", "Governorate"), + new State("Shabwah", "YE-SH", "Governorate"), + new State("Socotra", "YE-SS", "Governorate"), + new State("Ta’izz", "YE-TA", "Governorate") + }; +} + diff --git a/src/World.Net/Countries/Zambia.cs b/src/World.Net/Countries/Zambia.cs new file mode 100644 index 0000000..f1d36ae --- /dev/null +++ b/src/World.Net/Countries/Zambia.cs @@ -0,0 +1,36 @@ +namespace World.Net.Countries; + +internal sealed class Zambia : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Zambia; + + public string Name { get; } = "Zambia"; + + public string OfficialName { get; } = "Republic of Zambia"; + + public string NativeName => "Republic of Zambia"; + + public string Capital { get; } = "Lusaka"; + + public int NumericCode { get; } = 894; + + public string ISO2Code { get; } = "ZM"; + + public string ISO3Code { get; } = "ZMB"; + + public string[] CallingCode { get; } = ["+260"]; + + public IEnumerable States => new[] + { + new State("Central", "ZM-02", "Province"), + new State("Copperbelt", "ZM-08", "Province"), + new State("Eastern", "ZM-03", "Province"), + new State("Luapula", "ZM-04", "Province"), + new State("Lusaka", "ZM-09", "Province"), + new State("Muchinga", "ZM-13", "Province"), + new State("Northern", "ZM-05", "Province"), + new State("North-Western", "ZM-06", "Province"), + new State("Southern", "ZM-07", "Province"), + new State("Western", "ZM-01", "Province") + }; +} diff --git a/src/World.Net/Countries/Zimbabwe.cs b/src/World.Net/Countries/Zimbabwe.cs new file mode 100644 index 0000000..6536edc --- /dev/null +++ b/src/World.Net/Countries/Zimbabwe.cs @@ -0,0 +1,37 @@ +namespace World.Net.Countries; + +internal sealed class Zimbabwe : ICountry +{ + public CountryIdentifier Id => CountryIdentifier.Zimbabwe; + + public string Name { get; } = "Zimbabwe"; + + public string OfficialName { get; } = "Republic of Zimbabwe"; + + public string NativeName => "Republic of Zimbabwe"; + + public string Capital { get; } = "Harare"; + + public int NumericCode { get; } = 716; + + public string ISO2Code { get; } = "ZW"; + + public string ISO3Code { get; } = "ZWE"; + + public string[] CallingCode { get; } = ["+263"]; + + public IEnumerable States => new[] + { + new State("Bulawayo", "ZW-BU", "Province"), + new State("Harare", "ZW-HA", "Province"), + new State("Manicaland", "ZW-MA", "Province"), + new State("Mashonaland Central", "ZW-MC", "Province"), + new State("Mashonaland East", "ZW-ME", "Province"), + new State("Mashonaland West", "ZW-MW", "Province"), + new State("Masvingo", "ZW-MV", "Province"), + new State("Matabeleland North", "ZW-MN", "Province"), + new State("Matabeleland South", "ZW-MS", "Province"), + new State("Midlands", "ZW-MI", "Province") + }; +} + diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index 534157b..99434f3 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -207,6 +207,25 @@ public static Dictionary Initialize() { CountryIdentifier.Turkmenistan, new Turkmenistan() }, { CountryIdentifier.TurksAndCaicosIslands, new TurksAndCaicosIslands() }, { CountryIdentifier.Tuvalu, new Tuvalu() }, + { CountryIdentifier.Uganda, new Uganda() }, + { CountryIdentifier.Ukraine, new Ukraine() }, + { CountryIdentifier.UnitedArabEmirates, new UnitedArabEmirates() }, + { CountryIdentifier.UnitedKingdom, new UnitedKingdom() }, + { CountryIdentifier.UnitedStates, new UnitedStates() }, + { CountryIdentifier.UnitedStatesMinorOutlyingIslands, new UnitedStatesMinorOutlyingIslands() }, + { CountryIdentifier.Uruguay, new Uruguay() }, + { CountryIdentifier.Uzbekistan, new Uzbekistan() }, + { CountryIdentifier.Vanuatu, new Vanuatu() }, + { CountryIdentifier.VaticanCityState, new VaticanCity() }, + { CountryIdentifier.Venezuela, new Venezuela() }, + { CountryIdentifier.Vietnam, new Vietnam() }, + { CountryIdentifier.VirginIslandsBritish, new VirginIslandsBritish() }, + { CountryIdentifier.VirginIslandsUS, new VirginIslandsUS() }, + { CountryIdentifier.WallisAndFutunaIslands, new WallisAndFutuna() }, + { CountryIdentifier.WesternSahara, new WesternSahara() }, + { CountryIdentifier.Yemen, new Yemen() }, + { CountryIdentifier.Zambia, new Zambia() }, + { CountryIdentifier.Zimbabwe, new Zimbabwe() }, // Future countries can be added here in the same format. };