From 35a287ae32997b511793347288f31695104a9286 Mon Sep 17 00:00:00 2001 From: IDAM Date: Thu, 18 Dec 2025 17:33:24 +0100 Subject: [PATCH] Hungary, Iceland, India, Indonesia, Iran --- .../Countries/HungaryTest.cs | 61 +++++++++++++++ .../Countries/IcelandTest.cs | 49 ++++++++++++ .../Countries/IndiaTest.cs | 77 +++++++++++++++++++ .../Countries/IndonesiaTest.cs | 75 ++++++++++++++++++ src/World.Net.UnitTests/Countries/IranTest.cs | 72 +++++++++++++++++ src/World.Net/Countries/Hungary.cs | 56 ++++++++++++++ src/World.Net/Countries/Iceland.cs | 44 +++++++++++ src/World.Net/Countries/India.cs | 72 +++++++++++++++++ src/World.Net/Countries/Indonesia.cs | 70 +++++++++++++++++ src/World.Net/Countries/Iran.cs | 68 ++++++++++++++++ src/World.Net/Helpers/CountryInitializer.cs | 5 ++ 11 files changed, 649 insertions(+) create mode 100644 src/World.Net.UnitTests/Countries/HungaryTest.cs create mode 100644 src/World.Net.UnitTests/Countries/IcelandTest.cs create mode 100644 src/World.Net.UnitTests/Countries/IndiaTest.cs create mode 100644 src/World.Net.UnitTests/Countries/IndonesiaTest.cs create mode 100644 src/World.Net.UnitTests/Countries/IranTest.cs create mode 100644 src/World.Net/Countries/Hungary.cs create mode 100644 src/World.Net/Countries/Iceland.cs create mode 100644 src/World.Net/Countries/India.cs create mode 100644 src/World.Net/Countries/Indonesia.cs create mode 100644 src/World.Net/Countries/Iran.cs diff --git a/src/World.Net.UnitTests/Countries/HungaryTest.cs b/src/World.Net.UnitTests/Countries/HungaryTest.cs new file mode 100644 index 0000000..e302500 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/HungaryTest.cs @@ -0,0 +1,61 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class HungaryTest : AssertCountryTestBase +{ + private const string HUNGARY_COUNTRY_NAME = "Hungary"; + private const string HUNGARY_NATIVE_NAME = "Magyarország"; + private const string HUNGARY_CAPITAL = "Budapest"; + private const string HUNGARY_OFFICIAL_NAME = "Hungary"; + private const string HUNGARY_ISO2_CODE = "HU"; + private const string HUNGARY_ISO3_CODE = "HUN"; + private const int HUNGARY_NUMERIC_CODE = 348; + private readonly string[] HUNGARY_CALLING_CODE = ["+36"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Hungary; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Budapest", "HU-BU", "Capital City"), + new("Bács-Kiskun", "HU-BK", "County"), + new("Baranya", "HU-BA", "County"), + new("Békés", "HU-BE", "County"), + new("Borsod-Abaúj-Zemplén", "HU-BO", "County"), + new("Csongrád-Csanád", "HU-CS", "County"), + new("Fejér", "HU-FE", "County"), + new("Győr-Moson-Sopron", "HU-GS", "County"), + new("Hajdú-Bihar", "HU-HB", "County"), + new("Heves", "HU-HE", "County"), + new("Jász-Nagykun-Szolnok", "HU-JN", "County"), + new("Komárom-Esztergom", "HU-KM", "County"), + new("Nógrád", "HU-NO", "County"), + new("Pest", "HU-PE", "County"), + new("Somogy", "HU-SO", "County"), + new("Szabolcs-Szatmár-Bereg", "HU-SZ", "County"), + new("Tolna", "HU-TO", "County"), + new("Vas", "HU-VA", "County"), + new("Veszprém", "HU-VE", "County"), + new("Zala", "HU-ZA", "County") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForHungary() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + HUNGARY_COUNTRY_NAME, + HUNGARY_OFFICIAL_NAME, + HUNGARY_NATIVE_NAME, + HUNGARY_CAPITAL, + HUNGARY_NUMERIC_CODE, + HUNGARY_ISO2_CODE, + HUNGARY_ISO3_CODE, + HUNGARY_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/IcelandTest.cs b/src/World.Net.UnitTests/Countries/IcelandTest.cs new file mode 100644 index 0000000..ad9caa4 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/IcelandTest.cs @@ -0,0 +1,49 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class IcelandTest : AssertCountryTestBase +{ + private const string ICELAND_COUNTRY_NAME = "Iceland"; + private const string ICELAND_NATIVE_NAME = "Ísland"; + private const string ICELAND_CAPITAL = "Reykjavík"; + private const string ICELAND_OFFICIAL_NAME = "Republic of Iceland"; + private const string ICELAND_ISO2_CODE = "IS"; + private const string ICELAND_ISO3_CODE = "ISL"; + private const int ICELAND_NUMERIC_CODE = 352; + private readonly string[] ICELAND_CALLING_CODE = ["+354"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Iceland; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Capital Region", "IS-1", "Region"), + new("Southern Peninsula", "IS-2", "Region"), + new("West", "IS-3", "Region"), + new("Westfjords", "IS-4", "Region"), + new("North", "IS-5", "Region"), + new("Northwest", "IS-6", "Region"), + new("East", "IS-7", "Region"), + new("South", "IS-8", "Region") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForIceland() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + ICELAND_COUNTRY_NAME, + ICELAND_OFFICIAL_NAME, + ICELAND_NATIVE_NAME, + ICELAND_CAPITAL, + ICELAND_NUMERIC_CODE, + ICELAND_ISO2_CODE, + ICELAND_ISO3_CODE, + ICELAND_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/IndiaTest.cs b/src/World.Net.UnitTests/Countries/IndiaTest.cs new file mode 100644 index 0000000..c69533c --- /dev/null +++ b/src/World.Net.UnitTests/Countries/IndiaTest.cs @@ -0,0 +1,77 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class IndiaTest : AssertCountryTestBase +{ + private const string INDIA_COUNTRY_NAME = "India"; + private const string INDIA_NATIVE_NAME = "भारत"; + private const string INDIA_CAPITAL = "New Delhi"; + private const string INDIA_OFFICIAL_NAME = "Republic of India"; + private const string INDIA_ISO2_CODE = "IN"; + private const string INDIA_ISO3_CODE = "IND"; + private const int INDIA_NUMERIC_CODE = 356; + private readonly string[] INDIA_CALLING_CODE = ["+91"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.India; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Andhra Pradesh", "IN-AP", "State"), + new("Arunachal Pradesh", "IN-AR", "State"), + new("Assam", "IN-AS", "State"), + new("Bihar", "IN-BR", "State"), + new("Chhattisgarh", "IN-CT", "State"), + new("Goa", "IN-GA", "State"), + new("Gujarat", "IN-GJ", "State"), + new("Haryana", "IN-HR", "State"), + new("Himachal Pradesh", "IN-HP", "State"), + new("Jharkhand", "IN-JH", "State"), + new("Karnataka", "IN-KA", "State"), + new("Kerala", "IN-KL", "State"), + new("Madhya Pradesh", "IN-MP", "State"), + new("Maharashtra", "IN-MH", "State"), + new("Manipur", "IN-MN", "State"), + new("Meghalaya", "IN-ML", "State"), + new("Mizoram", "IN-MZ", "State"), + new("Nagaland", "IN-NL", "State"), + new("Odisha", "IN-OR", "State"), + new("Punjab", "IN-PB", "State"), + new("Rajasthan", "IN-RJ", "State"), + new("Sikkim", "IN-SK", "State"), + new("Tamil Nadu", "IN-TN", "State"), + new("Telangana", "IN-TG", "State"), + new("Tripura", "IN-TR", "State"), + new("Uttar Pradesh", "IN-UP", "State"), + new("Uttarakhand", "IN-UT", "State"), + new("West Bengal", "IN-WB", "State"), + new("Andaman and Nicobar Islands", "IN-AN", "Union Territory"), + new("Chandigarh", "IN-CH", "Union Territory"), + new("Dadra and Nagar Haveli and Daman and Diu", "IN-DN", "Union Territory"), + new("Delhi", "IN-DL", "Union Territory"), + new("Jammu and Kashmir", "IN-JK", "Union Territory"), + new("Ladakh", "IN-LA", "Union Territory"), + new("Lakshadweep", "IN-LD", "Union Territory"), + new("Puducherry", "IN-PY", "Union Territory") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForIndia() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + INDIA_COUNTRY_NAME, + INDIA_OFFICIAL_NAME, + INDIA_NATIVE_NAME, + INDIA_CAPITAL, + INDIA_NUMERIC_CODE, + INDIA_ISO2_CODE, + INDIA_ISO3_CODE, + INDIA_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/IndonesiaTest.cs b/src/World.Net.UnitTests/Countries/IndonesiaTest.cs new file mode 100644 index 0000000..a110d7d --- /dev/null +++ b/src/World.Net.UnitTests/Countries/IndonesiaTest.cs @@ -0,0 +1,75 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class IndonesiaTest : AssertCountryTestBase +{ + private const string INDONESIA_COUNTRY_NAME = "Indonesia"; + private const string INDONESIA_NATIVE_NAME = "Indonesia"; + private const string INDONESIA_CAPITAL = "Jakarta"; + private const string INDONESIA_OFFICIAL_NAME = "Republic of Indonesia"; + private const string INDONESIA_ISO2_CODE = "ID"; + private const string INDONESIA_ISO3_CODE = "IDN"; + private const int INDONESIA_NUMERIC_CODE = 360; + private readonly string[] INDONESIA_CALLING_CODE = ["+62"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Indonesia; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Aceh", "ID-AC", "Special Region"), + new("Bali", "ID-BA", "Province"), + new("Banten", "ID-BT", "Province"), + new("Bengkulu", "ID-BE", "Province"), + new("Central Java", "ID-JT", "Province"), + new("Central Kalimantan", "ID-KT", "Province"), + new("Central Sulawesi", "ID-ST", "Province"), + new("East Java", "ID-JI", "Province"), + new("East Kalimantan", "ID-KI", "Province"), + new("East Nusa Tenggara", "ID-NT", "Province"), + new("Gorontalo", "ID-GO", "Province"), + new("Jakarta", "ID-JK", "Special Capital Region"), + new("Jambi", "ID-JA", "Province"), + new("Lampung", "ID-LA", "Province"), + new("Maluku", "ID-MA", "Province"), + new("North Kalimantan", "ID-KU", "Province"), + new("North Maluku", "ID-MU", "Province"), + new("North Sulawesi", "ID-SA", "Province"), + new("North Sumatra", "ID-SU", "Province"), + new("Papua", "ID-PA", "Province"), + new("Riau", "ID-RI", "Province"), + new("Riau Islands", "ID-KR", "Province"), + new("Southeast Sulawesi", "ID-SG", "Province"), + new("South Kalimantan", "ID-KS", "Province"), + new("South Sulawesi", "ID-SN", "Province"), + new("South Sumatra", "ID-SS", "Province"), + new("Special Region of Yogyakarta", "ID-YO", "Special Region"), + new("West Java", "ID-JB", "Province"), + new("West Kalimantan", "ID-KB", "Province"), + new("West Nusa Tenggara", "ID-NB", "Province"), + new("West Papua", "ID-PA", "Province"), + new("West Sulawesi", "ID-SB", "Province"), + new("West Sumatra", "ID-SB", "Province"), + new("South East Sulawesi", "ID-SG", "Province") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForIndonesia() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + INDONESIA_COUNTRY_NAME, + INDONESIA_OFFICIAL_NAME, + INDONESIA_NATIVE_NAME, + INDONESIA_CAPITAL, + INDONESIA_NUMERIC_CODE, + INDONESIA_ISO2_CODE, + INDONESIA_ISO3_CODE, + INDONESIA_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net.UnitTests/Countries/IranTest.cs b/src/World.Net.UnitTests/Countries/IranTest.cs new file mode 100644 index 0000000..4b5f74f --- /dev/null +++ b/src/World.Net.UnitTests/Countries/IranTest.cs @@ -0,0 +1,72 @@ +namespace World.Net.UnitTests.Countries; + +public sealed class IranTest : AssertCountryTestBase +{ + private const string IRAN_COUNTRY_NAME = "Iran"; + private const string IRAN_NATIVE_NAME = "ایران"; + private const string IRAN_CAPITAL = "Tehran"; + private const string IRAN_OFFICIAL_NAME = "Islamic Republic of Iran"; + private const string IRAN_ISO2_CODE = "IR"; + private const string IRAN_ISO3_CODE = "IRN"; + private const int IRAN_NUMERIC_CODE = 364; + private readonly string[] IRAN_CALLING_CODE = ["+98"]; + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Iran; + + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = + [ + new("Alborz", "IR-AL", "Province"), + new("Ardabil", "IR-AR", "Province"), + new("Bushehr", "IR-BU", "Province"), + new("Chaharmahal and Bakhtiari", "IR-CH", "Province"), + new("East Azerbaijan", "IR-ES", "Province"), + new("Fars", "IR-FA", "Province"), + new("Gilan", "IR-GI", "Province"), + new("Golestan", "IR-GO", "Province"), + new("Hamadan", "IR-HM", "Province"), + new("Hormozgan", "IR-HR", "Province"), + new("Ilam", "IR-IL", "Province"), + new("Isfahan", "IR-IS", "Province"), + new("Kerman", "IR-KR", "Province"), + new("Kermanshah", "IR-KS", "Province"), + new("Khorasan North", "IR-KN", "Province"), + new("Khorasan Razavi", "IR-KRZ", "Province"), + new("Khorasan South", "IR-KS", "Province"), + new("Khuzestan", "IR-KH", "Province"), + new("Kohgiluyeh and Boyer-Ahmad", "IR-KB", "Province"), + new("Kurdistan", "IR-KD", "Province"), + new("Lorestan", "IR-LR", "Province"), + new("Markazi", "IR-MK", "Province"), + new("Mazandaran", "IR-MZ", "Province"), + new("Qazvin", "IR-QZ", "Province"), + new("Qom", "IR-QM", "Province"), + new("Semnan", "IR-SM", "Province"), + new("Sistan and Baluchestan", "IR-SB", "Province"), + new("Tehran", "IR-TH", "Province"), + new("West Azerbaijan", "IR-WA", "Province"), + new("Yazd", "IR-YZ", "Province"), + new("Zanjan", "IR-ZN", "Province") + ]; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForIran() + { + // Arrange + // Act + var country = CountryProvider.GetCountry(EXPECTEDID); + + // Assert + AssertCorrectInformation( + country, + EXPECTEDID, + IRAN_COUNTRY_NAME, + IRAN_OFFICIAL_NAME, + IRAN_NATIVE_NAME, + IRAN_CAPITAL, + IRAN_NUMERIC_CODE, + IRAN_ISO2_CODE, + IRAN_ISO3_CODE, + IRAN_CALLING_CODE, + EXPECTED_STATES + ); + } +} diff --git a/src/World.Net/Countries/Hungary.cs b/src/World.Net/Countries/Hungary.cs new file mode 100644 index 0000000..5c2b19b --- /dev/null +++ b/src/World.Net/Countries/Hungary.cs @@ -0,0 +1,56 @@ +namespace World.Net.Countries; + +internal sealed class Hungary : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.Hungary; + + // + public string Name { get; } = "Hungary"; + + // + public string OfficialName { get; } = "Hungary"; + + // + public string NativeName => "Magyarország"; + + // + public string Capital { get; } = "Budapest"; + + // + public int NumericCode { get; } = 348; + + // + public string ISO2Code { get; } = "HU"; + + // + public string ISO3Code { get; } = "HUN"; + + // + public string[] CallingCode { get; } = ["+36"]; + + // + public IEnumerable States => + [ + new("Budapest", "HU-BU", "Capital City"), + new("Bács-Kiskun", "HU-BK", "County"), + new("Baranya", "HU-BA", "County"), + new("Békés", "HU-BE", "County"), + new("Borsod-Abaúj-Zemplén", "HU-BO", "County"), + new("Csongrád-Csanád", "HU-CS", "County"), + new("Fejér", "HU-FE", "County"), + new("Győr-Moson-Sopron", "HU-GS", "County"), + new("Hajdú-Bihar", "HU-HB", "County"), + new("Heves", "HU-HE", "County"), + new("Jász-Nagykun-Szolnok", "HU-JN", "County"), + new("Komárom-Esztergom", "HU-KM", "County"), + new("Nógrád", "HU-NO", "County"), + new("Pest", "HU-PE", "County"), + new("Somogy", "HU-SO", "County"), + new("Szabolcs-Szatmár-Bereg", "HU-SZ", "County"), + new("Tolna", "HU-TO", "County"), + new("Vas", "HU-VA", "County"), + new("Veszprém", "HU-VE", "County"), + new("Zala", "HU-ZA", "County") + ]; +} diff --git a/src/World.Net/Countries/Iceland.cs b/src/World.Net/Countries/Iceland.cs new file mode 100644 index 0000000..134da51 --- /dev/null +++ b/src/World.Net/Countries/Iceland.cs @@ -0,0 +1,44 @@ +namespace World.Net.Countries; + +internal sealed class Iceland : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.Iceland; + + // + public string Name { get; } = "Iceland"; + + // + public string OfficialName { get; } = "Republic of Iceland"; + + // + public string NativeName => "Ísland"; + + // + public string Capital { get; } = "Reykjavík"; + + // + public int NumericCode { get; } = 352; + + // + public string ISO2Code { get; } = "IS"; + + // + public string ISO3Code { get; } = "ISL"; + + // + public string[] CallingCode { get; } = ["+354"]; + + // + public IEnumerable States => + [ + new("Capital Region", "IS-1", "Region"), + new("Southern Peninsula", "IS-2", "Region"), + new("West", "IS-3", "Region"), + new("Westfjords", "IS-4", "Region"), + new("North", "IS-5", "Region"), + new("Northwest", "IS-6", "Region"), + new("East", "IS-7", "Region"), + new("South", "IS-8", "Region") + ]; +} diff --git a/src/World.Net/Countries/India.cs b/src/World.Net/Countries/India.cs new file mode 100644 index 0000000..77e15ae --- /dev/null +++ b/src/World.Net/Countries/India.cs @@ -0,0 +1,72 @@ +namespace World.Net.Countries; + +internal sealed class India : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.India; + + // + public string Name { get; } = "India"; + + // + public string OfficialName { get; } = "Republic of India"; + + // + public string NativeName => "भारत"; + + // + public string Capital { get; } = "New Delhi"; + + // + public int NumericCode { get; } = 356; + + // + public string ISO2Code { get; } = "IN"; + + // + public string ISO3Code { get; } = "IND"; + + // + public string[] CallingCode { get; } = ["+91"]; + + // + public IEnumerable States => + [ + new("Andhra Pradesh", "IN-AP", "State"), + new("Arunachal Pradesh", "IN-AR", "State"), + new("Assam", "IN-AS", "State"), + new("Bihar", "IN-BR", "State"), + new("Chhattisgarh", "IN-CT", "State"), + new("Goa", "IN-GA", "State"), + new("Gujarat", "IN-GJ", "State"), + new("Haryana", "IN-HR", "State"), + new("Himachal Pradesh", "IN-HP", "State"), + new("Jharkhand", "IN-JH", "State"), + new("Karnataka", "IN-KA", "State"), + new("Kerala", "IN-KL", "State"), + new("Madhya Pradesh", "IN-MP", "State"), + new("Maharashtra", "IN-MH", "State"), + new("Manipur", "IN-MN", "State"), + new("Meghalaya", "IN-ML", "State"), + new("Mizoram", "IN-MZ", "State"), + new("Nagaland", "IN-NL", "State"), + new("Odisha", "IN-OR", "State"), + new("Punjab", "IN-PB", "State"), + new("Rajasthan", "IN-RJ", "State"), + new("Sikkim", "IN-SK", "State"), + new("Tamil Nadu", "IN-TN", "State"), + new("Telangana", "IN-TG", "State"), + new("Tripura", "IN-TR", "State"), + new("Uttar Pradesh", "IN-UP", "State"), + new("Uttarakhand", "IN-UT", "State"), + new("West Bengal", "IN-WB", "State"), + new("Andaman and Nicobar Islands", "IN-AN", "Union Territory"), + new("Chandigarh", "IN-CH", "Union Territory"), + new("Dadra and Nagar Haveli and Daman and Diu", "IN-DN", "Union Territory"), + new("Delhi", "IN-DL", "Union Territory"), + new("Jammu and Kashmir", "IN-JK", "Union Territory"), + new("Ladakh", "IN-LA", "Union Territory"), + new("Lakshadweep", "IN-LD", "Union Territory"), + new("Puducherry", "IN-PY", "Union Territory") + ]; +} diff --git a/src/World.Net/Countries/Indonesia.cs b/src/World.Net/Countries/Indonesia.cs new file mode 100644 index 0000000..486c71d --- /dev/null +++ b/src/World.Net/Countries/Indonesia.cs @@ -0,0 +1,70 @@ +namespace World.Net.Countries; + +internal sealed class Indonesia : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.Indonesia; + + // + public string Name { get; } = "Indonesia"; + + // + public string OfficialName { get; } = "Republic of Indonesia"; + + // + public string NativeName => "Indonesia"; + + // + public string Capital { get; } = "Jakarta"; + + // + public int NumericCode { get; } = 360; + + // + public string ISO2Code { get; } = "ID"; + + // + public string ISO3Code { get; } = "IDN"; + + // + public string[] CallingCode { get; } = ["+62"]; + + // + public IEnumerable States => + [ + new("Aceh", "ID-AC", "Special Region"), + new("Bali", "ID-BA", "Province"), + new("Banten", "ID-BT", "Province"), + new("Bengkulu", "ID-BE", "Province"), + new("Central Java", "ID-JT", "Province"), + new("Central Kalimantan", "ID-KT", "Province"), + new("Central Sulawesi", "ID-ST", "Province"), + new("East Java", "ID-JI", "Province"), + new("East Kalimantan", "ID-KI", "Province"), + new("East Nusa Tenggara", "ID-NT", "Province"), + new("Gorontalo", "ID-GO", "Province"), + new("Jakarta", "ID-JK", "Special Capital Region"), + new("Jambi", "ID-JA", "Province"), + new("Lampung", "ID-LA", "Province"), + new("Maluku", "ID-MA", "Province"), + new("North Kalimantan", "ID-KU", "Province"), + new("North Maluku", "ID-MU", "Province"), + new("North Sulawesi", "ID-SA", "Province"), + new("North Sumatra", "ID-SU", "Province"), + new("Papua", "ID-PA", "Province"), + new("Riau", "ID-RI", "Province"), + new("Riau Islands", "ID-KR", "Province"), + new("Southeast Sulawesi", "ID-SG", "Province"), + new("South Kalimantan", "ID-KS", "Province"), + new("South Sulawesi", "ID-SN", "Province"), + new("South Sumatra", "ID-SS", "Province"), + new("Special Region of Yogyakarta", "ID-YO", "Special Region"), + new("West Java", "ID-JB", "Province"), + new("West Kalimantan", "ID-KB", "Province"), + new("West Nusa Tenggara", "ID-NB", "Province"), + new("West Papua", "ID-PA", "Province"), + new("West Sulawesi", "ID-SB", "Province"), + new("West Sumatra", "ID-SB", "Province"), + new("South East Sulawesi", "ID-SG", "Province") + ]; +} diff --git a/src/World.Net/Countries/Iran.cs b/src/World.Net/Countries/Iran.cs new file mode 100644 index 0000000..dd4b1b6 --- /dev/null +++ b/src/World.Net/Countries/Iran.cs @@ -0,0 +1,68 @@ +namespace World.Net.Countries; + +internal sealed class Iran : ICountry +{ + // + public CountryIdentifier Id => CountryIdentifier.Iran; + + // + public string Name { get; } = "Iran"; + + // + public string OfficialName { get; } = "Islamic Republic of Iran"; + + // + public string NativeName => "ایران"; + + // + public string Capital { get; } = "Tehran"; + + // + public int NumericCode { get; } = 364; + + // + public string ISO2Code { get; } = "IR"; + + // + public string ISO3Code { get; } = "IRN"; + + // + public string[] CallingCode { get; } = ["+98"]; + + // + public IEnumerable States => + [ + new("Alborz", "IR-AL", "Province"), + new("Ardabil", "IR-AR", "Province"), + new("Bushehr", "IR-BU", "Province"), + new("Chaharmahal and Bakhtiari", "IR-CH", "Province"), + new("East Azerbaijan", "IR-ES", "Province"), + new("Fars", "IR-FA", "Province"), + new("Gilan", "IR-GI", "Province"), + new("Golestan", "IR-GO", "Province"), + new("Hamadan", "IR-HM", "Province"), + new("Hormozgan", "IR-HR", "Province"), + new("Ilam", "IR-IL", "Province"), + new("Isfahan", "IR-IS", "Province"), + new("Kerman", "IR-KR", "Province"), + new("Kermanshah", "IR-KS", "Province"), + new("Khorasan North", "IR-KN", "Province"), + new("Khorasan Razavi", "IR-KRZ", "Province"), + new("Khorasan South", "IR-KS", "Province"), + new("Khuzestan", "IR-KH", "Province"), + new("Kohgiluyeh and Boyer-Ahmad", "IR-KB", "Province"), + new("Kurdistan", "IR-KD", "Province"), + new("Lorestan", "IR-LR", "Province"), + new("Markazi", "IR-MK", "Province"), + new("Mazandaran", "IR-MZ", "Province"), + new("Qazvin", "IR-QZ", "Province"), + new("Qom", "IR-QM", "Province"), + new("Semnan", "IR-SM", "Province"), + new("Sistan and Baluchestan", "IR-SB", "Province"), + new("Tehran", "IR-TH", "Province"), + new("West Azerbaijan", "IR-WA", "Province"), + new("Yazd", "IR-YZ", "Province"), + new("Zanjan", "IR-ZN", "Province") + ]; +} + diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index 10f312d..f27693b 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -103,6 +103,11 @@ public static Dictionary Initialize() { CountryIdentifier.HeardIslandAndMcDonaldIslands, new HeardIslandAndMcDonaldIslands() }, { CountryIdentifier.Honduras, new Honduras() }, { CountryIdentifier.HongKongSAR, new HongKong() }, + { CountryIdentifier.Hungary, new Hungary() }, + { CountryIdentifier.Iceland, new Iceland() }, + { CountryIdentifier.India, new India() }, + { CountryIdentifier.Indonesia, new Indonesia() }, + { CountryIdentifier.Iran, new Iran() }, { CountryIdentifier.Iraq, new Iraq() }, { CountryIdentifier.Ireland, new Ireland() }, { CountryIdentifier.Israel, new Israel() },