From e57de560b53d40d894637b901c9d57d329f2668a Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 11:37:23 +0100 Subject: [PATCH 1/9] add estonia --- .../Countries/EstoniaTests.cs | 40 +++++++++++++++++ src/World.Net/Countries/Estonia.cs | 43 +++++++++++++++++++ src/World.Net/Helpers/CountryInitializer.cs | 23 ++++++++++ 3 files changed, 106 insertions(+) create mode 100644 src/World.Net.UnitTests/Countries/EstoniaTests.cs create mode 100644 src/World.Net/Countries/Estonia.cs diff --git a/src/World.Net.UnitTests/Countries/EstoniaTests.cs b/src/World.Net.UnitTests/Countries/EstoniaTests.cs new file mode 100644 index 0000000..37c8b77 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/EstoniaTests.cs @@ -0,0 +1,40 @@ +namespace World.Net.UnitTests.Countries +{ + public sealed class EstoniaTests + { + private const string ESTONIA_NAME = "Estonia"; + private const int ESTONIA_STATE_COUNT = 15; + private const string ESTONIA_OFFICIAL_NAME = "Republic of Estonia"; + private const string ESTONIA_NATIVE_NAME = "Eesti"; + private const string ESTONIA_CAPITAL = "Tallinn"; + private const int ESTONIA_NUMERIC_CODE = 233; + private const string ESTONIA_ISO2_CODE = "EE"; + private const string ESTONIA_ISO3_CODE = "EST"; + private readonly string[] ESTONIA_CALLING_CODE = ["372"]; + private static readonly string[] VALID_STATE_TYPES = { "County" }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForEstonia() + { + // Arrange + CountryIdentifier existingCountryId = CountryIdentifier.Estonia; + + // Act + var country = CountryProvider.GetCountry(existingCountryId); + + // Assert + Assert.Equal(existingCountryId, country.Id); + Assert.Equal(ESTONIA_NAME, country.Name); + Assert.NotNull(country.States); + Assert.Equal(ESTONIA_STATE_COUNT, country.States.Count()); + Assert.Equal(ESTONIA_OFFICIAL_NAME, country.OfficialName); + Assert.Equal(ESTONIA_NATIVE_NAME, country.NativeName); + Assert.Equal(ESTONIA_CAPITAL, country.Capital); + Assert.Equal(ESTONIA_NUMERIC_CODE, country.NumericCode); + Assert.Equal(ESTONIA_ISO2_CODE, country.ISO2Code); + Assert.Equal(ESTONIA_ISO3_CODE, country.ISO3Code); + Assert.All(country.States, state => Assert.Contains(state.Type, VALID_STATE_TYPES)); + Assert.Equal(ESTONIA_CALLING_CODE, country.CallingCode); + } + } +} diff --git a/src/World.Net/Countries/Estonia.cs b/src/World.Net/Countries/Estonia.cs new file mode 100644 index 0000000..1361a74 --- /dev/null +++ b/src/World.Net/Countries/Estonia.cs @@ -0,0 +1,43 @@ + +namespace World.Net.Countries +{ + internal class Estonia : ICountry + { + public CountryIdentifier Id => CountryIdentifier.Estonia; + + public string Name => nameof(Estonia); + + public string OfficialName => "Republic of Estonia"; + + public string NativeName => "Eesti"; + + public string Capital => "Tallinn"; + + public int NumericCode => 233; + + public string ISO2Code => "EE"; + + public string ISO3Code => "EST"; + + public string[] CallingCode => ["372"]; + + public IEnumerable States => + [ + new("Harju", "37", "County"), + new("Hiiu", "39", "County"), + new("Ida-Viru", "44", "County"), + new("Jõgeva", "49", "County"), + new("Järva", "51", "County"), + new("Lääne", "57", "County"), + new("Lääne-Viru", "59", "County"), + new("Põlva", "65", "County"), + new("Pärnu", "67", "County"), + new("Rapla", "70", "County"), + new("Saare", "74", "County"), + new("Tartu", "78", "County"), + new("Valga", "82", "County"), + new("Viljandi", "84", "County"), + new("Võru", "86", "County") + ]; + } +} diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index 9c15451..df31cc2 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -55,6 +55,29 @@ public static Dictionary Initialize() { CountryIdentifier.CocosKeelingIslands, new CocosKeelingIslands() }, { CountryIdentifier.Colombia, new Colombia() }, { CountryIdentifier.Comoros, new Comoros() }, + { CountryIdentifier.Congo, new Congo() }, + { CountryIdentifier.CostaRica, new CostaRica() }, + { CountryIdentifier.CookIslands, new CookIslands() }, + { CountryIdentifier.CoteDIvoire, new CoteDIvoire() }, + { CountryIdentifier.Croatia, new Croatia() }, + { CountryIdentifier.Cuba, new Cuba() }, + { CountryIdentifier.Curacao, new Curaçao() }, + { CountryIdentifier.Cyprus, new Cyprus() }, + { CountryIdentifier.CzechRepublic, new CzechRepublic() }, + { CountryIdentifier.Denmark, new Denmark() }, + { CountryIdentifier.Djibouti, new Djibouti() }, + { CountryIdentifier.Dominica, new Dominica() }, + { CountryIdentifier.DominicanRepublic, new DominicanRepublic() }, + { CountryIdentifier.TimorLeste, new TimorLeste() }, + { CountryIdentifier.Ecuador, new Ecuador() }, + { CountryIdentifier.Egypt, new Egypt() }, + { CountryIdentifier.Estonia, new Estonia() }, + { CountryIdentifier.FaroeIslands, new FaroeIslands() }, + { CountryIdentifier.FijiIslands, new FijiIslands() }, + { CountryIdentifier.Finland, new Finland() }, + { CountryIdentifier.France, new France() }, + { CountryIdentifier.FrenchGuiana, new FrenchGuiana() }, + { CountryIdentifier.FrenchPolynesia, new FrenchPolynesia() }, // Future countries can be added here in the same format. }; From 84bc92c0b7e6a03df0e29ecb23be2fd6b8753af6 Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 11:40:34 +0100 Subject: [PATCH 2/9] initialize estonia --- src/World.Net/Helpers/CountryInitializer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index e898d83..dfc17e7 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -71,6 +71,7 @@ public static Dictionary Initialize() { CountryIdentifier.TimorLeste, new TimorLeste() }, { CountryIdentifier.Ecuador, new Ecuador() }, { CountryIdentifier.Egypt, new Egypt() }, + { CountryIdentifier.Estonia, new Estonia() }, { CountryIdentifier.FaroeIslands, new FaroeIslands() }, { CountryIdentifier.FijiIslands, new FijiIslands() }, { CountryIdentifier.Finland, new Finland() }, From 983c251ae4096d41e639e504423c2e7ce7873ab8 Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 11:48:59 +0100 Subject: [PATCH 3/9] add Ethiopia details --- src/World.Net/Countries/Ethiopia.cs | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/World.Net/Countries/Ethiopia.cs diff --git a/src/World.Net/Countries/Ethiopia.cs b/src/World.Net/Countries/Ethiopia.cs new file mode 100644 index 0000000..2da8ab0 --- /dev/null +++ b/src/World.Net/Countries/Ethiopia.cs @@ -0,0 +1,39 @@ +namespace World.Net.Countries +{ + internal class Ethiopia : ICountry + { + public CountryIdentifier Id => CountryIdentifier.Ethiopia; + + public string Name => nameof(Ethiopia); + + public string OfficialName => "Federal Democratic Republic of Ethiopia"; + + public string NativeName => "ኢትዮጵያ"; + + public string Capital => "Addis Ababa"; + + public int NumericCode => 231; + + public string ISO2Code => "ET"; + + public string ISO3Code => "ETH"; + + public string[] CallingCode => ["251"]; + + public IEnumerable States => + [ + new("Addis Ababa", "AA", "Administration"), + new("Afar", "AF", "Region"), + new("Amhara", "AM", "Region"), + new("Benishangul-Gumuz", "BE", "Region"), + new("Dire Dawa", "DD", "Administration"), + new("Gambela", "GA", "Region"), + new("Harari", "HA", "Region"), + new("Oromia", "OR", "Region"), + new("Sidama", "SI", "Region"), + new("Somali", "SO", "Region"), + new("Southern Nations, Nationalities, and Peoples' Region", "SN", "Region"), + new("Tigray", "TI", "Region") + ]; + } +} From 42615bc4c833819428c001b97f84370fbf0bd42d Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 12:37:26 +0100 Subject: [PATCH 4/9] rename estonia test class --- .../Countries/{EstoniaTests.cs => EstoniaTest.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/World.Net.UnitTests/Countries/{EstoniaTests.cs => EstoniaTest.cs} (97%) diff --git a/src/World.Net.UnitTests/Countries/EstoniaTests.cs b/src/World.Net.UnitTests/Countries/EstoniaTest.cs similarity index 97% rename from src/World.Net.UnitTests/Countries/EstoniaTests.cs rename to src/World.Net.UnitTests/Countries/EstoniaTest.cs index 37c8b77..e9a235d 100644 --- a/src/World.Net.UnitTests/Countries/EstoniaTests.cs +++ b/src/World.Net.UnitTests/Countries/EstoniaTest.cs @@ -1,6 +1,6 @@ namespace World.Net.UnitTests.Countries { - public sealed class EstoniaTests + public sealed class EstoniaTest { private const string ESTONIA_NAME = "Estonia"; private const int ESTONIA_STATE_COUNT = 15; From 3ea2802d9c5504fc5d1ea0eade8a7c37113ddaff Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 12:41:10 +0100 Subject: [PATCH 5/9] add ethiopia test class --- .../Countries/EthiopiaTest.cs | 40 +++++++++++++++++++ src/World.Net/Helpers/CountryInitializer.cs | 1 + 2 files changed, 41 insertions(+) create mode 100644 src/World.Net.UnitTests/Countries/EthiopiaTest.cs diff --git a/src/World.Net.UnitTests/Countries/EthiopiaTest.cs b/src/World.Net.UnitTests/Countries/EthiopiaTest.cs new file mode 100644 index 0000000..606a0e9 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/EthiopiaTest.cs @@ -0,0 +1,40 @@ +namespace World.Net.UnitTests.Countries +{ + public sealed class EthiopiaTest + { + private const string ETHIOPIA_NAME = "Ethiopia"; + private const int ETHIOPIA_STATE_COUNT = 12; + private const string ETHIOPIA_OFFICIAL_NAME = "Federal Democratic Republic of Ethiopia"; + private const string ETHIOPIA_NATIVE_NAME = "ኢትዮጵያ"; + private const string ETHIOPIA_CAPITAL = "Addis Ababa"; + private const int ETHIOPIA_NUMERIC_CODE = 231; + private const string ETHIOPIA_ISO2_CODE = "ET"; + private const string ETHIOPIA_ISO3_CODE = "ETH"; + private readonly string[] ETHIOPIA_CALLING_CODE = ["251"]; + private static readonly string[] VALID_STATE_TYPES = { "Region", "Administration" }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForEthiopia() + { + // Arrange + CountryIdentifier existingCountryId = CountryIdentifier.Ethiopia; + + // Act + var country = CountryProvider.GetCountry(existingCountryId); + + // Assert + Assert.Equal(existingCountryId, country.Id); + Assert.Equal(ETHIOPIA_NAME, country.Name); + Assert.NotNull(country.States); + Assert.Equal(ETHIOPIA_STATE_COUNT, country.States.Count()); + Assert.Equal(ETHIOPIA_OFFICIAL_NAME, country.OfficialName); + Assert.Equal(ETHIOPIA_NATIVE_NAME, country.NativeName); + Assert.Equal(ETHIOPIA_CAPITAL, country.Capital); + Assert.Equal(ETHIOPIA_NUMERIC_CODE, country.NumericCode); + Assert.Equal(ETHIOPIA_ISO2_CODE, country.ISO2Code); + Assert.Equal(ETHIOPIA_ISO3_CODE, country.ISO3Code); + Assert.All(country.States, state => Assert.Contains(state.Type, VALID_STATE_TYPES)); + Assert.Equal(ETHIOPIA_CALLING_CODE, country.CallingCode); + } + } +} diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index dfc17e7..d4c47e5 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -72,6 +72,7 @@ public static Dictionary Initialize() { CountryIdentifier.Ecuador, new Ecuador() }, { CountryIdentifier.Egypt, new Egypt() }, { CountryIdentifier.Estonia, new Estonia() }, + { CountryIdentifier.Ethiopia, new Ethiopia() }, { CountryIdentifier.FaroeIslands, new FaroeIslands() }, { CountryIdentifier.FijiIslands, new FijiIslands() }, { CountryIdentifier.Finland, new Finland() }, From 511d7d2563a676066c24b2cca47d5231cd2294aa Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 13:14:31 +0100 Subject: [PATCH 6/9] add FalklandIslands details --- src/World.Net/Countries/FalklandIslands.cs | 29 +++++++++++++++++++++ src/World.Net/Helpers/CountryInitializer.cs | 1 + 2 files changed, 30 insertions(+) create mode 100644 src/World.Net/Countries/FalklandIslands.cs diff --git a/src/World.Net/Countries/FalklandIslands.cs b/src/World.Net/Countries/FalklandIslands.cs new file mode 100644 index 0000000..3a14e3b --- /dev/null +++ b/src/World.Net/Countries/FalklandIslands.cs @@ -0,0 +1,29 @@ +namespace World.Net.Countries +{ + internal class FalklandIslands : ICountry + { + public CountryIdentifier Id => CountryIdentifier.FalklandIslands; + + public string Name => nameof(FalklandIslands); + + public string OfficialName => "Falkland Islands"; + + public string NativeName => "Falkland Islands"; + + public string Capital => "Stanley"; + + public int NumericCode => 238; + + public string ISO2Code => "FK"; + + public string ISO3Code => "FLK"; + + public string[] CallingCode => ["500"]; + + public IEnumerable States => + [ + new("Falkland Islands", "FK", "Overseas Territory") + ]; + } + +} diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index d4c47e5..eab88eb 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -73,6 +73,7 @@ public static Dictionary Initialize() { CountryIdentifier.Egypt, new Egypt() }, { CountryIdentifier.Estonia, new Estonia() }, { CountryIdentifier.Ethiopia, new Ethiopia() }, + { CountryIdentifier.FalklandIslands, new FalklandIslands() }, { CountryIdentifier.FaroeIslands, new FaroeIslands() }, { CountryIdentifier.FijiIslands, new FijiIslands() }, { CountryIdentifier.Finland, new Finland() }, From ffe2b65d7a8caf1ac27e02e3c77d8893727f914d Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 13:14:40 +0100 Subject: [PATCH 7/9] add FalklandIslands tests --- .../Countries/FalklandIslandsTest.cs | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/World.Net.UnitTests/Countries/FalklandIslandsTest.cs diff --git a/src/World.Net.UnitTests/Countries/FalklandIslandsTest.cs b/src/World.Net.UnitTests/Countries/FalklandIslandsTest.cs new file mode 100644 index 0000000..c8c8d7d --- /dev/null +++ b/src/World.Net.UnitTests/Countries/FalklandIslandsTest.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public sealed class FalklandIslandsTest + { + private const string FALKLANDS_NAME = "FalklandIslands"; + private const string FALKLANDS_OFFICIAL_NAME = "Falkland Islands"; + private const string FALKLANDS_NATIVE_NAME = "Falkland Islands"; + private const string FALKLANDS_CAPITAL = "Stanley"; + private const int FALKLANDS_NUMERIC_CODE = 238; + private const string FALKLANDS_ISO2_CODE = "FK"; + private const string FALKLANDS_ISO3_CODE = "FLK"; + private readonly string[] FALKLANDS_CALLING_CODE = ["500"]; + private static readonly string[] VALID_STATE_TYPES = { "Overseas Territory" }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForFalklandIslands() + { + // Arrange + CountryIdentifier existingCountryId = CountryIdentifier.FalklandIslands; + + // Act + var country = CountryProvider.GetCountry(existingCountryId); + + // Assert + Assert.Equal(existingCountryId, country.Id); + Assert.Equal(FALKLANDS_NAME, country.Name); + Assert.NotNull(country.States); + Assert.Single(country.States); + Assert.Equal(FALKLANDS_OFFICIAL_NAME, country.OfficialName); + Assert.Equal(FALKLANDS_NATIVE_NAME, country.NativeName); + Assert.Equal(FALKLANDS_CAPITAL, country.Capital); + Assert.Equal(FALKLANDS_NUMERIC_CODE, country.NumericCode); + Assert.Equal(FALKLANDS_ISO2_CODE, country.ISO2Code); + Assert.Equal(FALKLANDS_ISO3_CODE, country.ISO3Code); + Assert.All(country.States, state => Assert.Contains(state.Type, VALID_STATE_TYPES)); + Assert.Equal(FALKLANDS_CALLING_CODE, country.CallingCode); + } + } +} From 1c7d0b949e149759a8dd3640819e12ee2fd35862 Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 13:19:58 +0100 Subject: [PATCH 8/9] add Eswatini --- src/World.Net/Countries/Estonia.cs | 2 +- src/World.Net/Countries/Eswatini.cs | 32 ++++++++++++++++++++++ src/World.Net/Countries/Ethiopia.cs | 2 +- src/World.Net/Countries/FalklandIslands.cs | 2 +- 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 src/World.Net/Countries/Eswatini.cs diff --git a/src/World.Net/Countries/Estonia.cs b/src/World.Net/Countries/Estonia.cs index 1361a74..162b4c8 100644 --- a/src/World.Net/Countries/Estonia.cs +++ b/src/World.Net/Countries/Estonia.cs @@ -1,7 +1,7 @@  namespace World.Net.Countries { - internal class Estonia : ICountry + internal sealed class Estonia : ICountry { public CountryIdentifier Id => CountryIdentifier.Estonia; diff --git a/src/World.Net/Countries/Eswatini.cs b/src/World.Net/Countries/Eswatini.cs new file mode 100644 index 0000000..9ecce67 --- /dev/null +++ b/src/World.Net/Countries/Eswatini.cs @@ -0,0 +1,32 @@ +namespace World.Net.Countries +{ + internal sealed class Eswatini : ICountry + { + public CountryIdentifier Id => CountryIdentifier.Eswatini; + + public string Name => nameof(Eswatini); + + public string OfficialName => "Kingdom of Eswatini"; + + public string NativeName => "eSwatini"; + + public string Capital => "Mbabane"; + + public int NumericCode => 748; + + public string ISO2Code => "SZ"; + + public string ISO3Code => "SWZ"; + + public string[] CallingCode => ["268"]; + + public IEnumerable States => + [ + new State("Hhohho", "HH", "Region"), + new State("Lubombo", "LU", "Region"), + new State("Manzini", "MA", "Region"), + new State("Shiselweni", "SH", "Region") + ]; + } + +} diff --git a/src/World.Net/Countries/Ethiopia.cs b/src/World.Net/Countries/Ethiopia.cs index 2da8ab0..4c74fc8 100644 --- a/src/World.Net/Countries/Ethiopia.cs +++ b/src/World.Net/Countries/Ethiopia.cs @@ -1,6 +1,6 @@ namespace World.Net.Countries { - internal class Ethiopia : ICountry + internal sealed class Ethiopia : ICountry { public CountryIdentifier Id => CountryIdentifier.Ethiopia; diff --git a/src/World.Net/Countries/FalklandIslands.cs b/src/World.Net/Countries/FalklandIslands.cs index 3a14e3b..765cad3 100644 --- a/src/World.Net/Countries/FalklandIslands.cs +++ b/src/World.Net/Countries/FalklandIslands.cs @@ -1,6 +1,6 @@ namespace World.Net.Countries { - internal class FalklandIslands : ICountry + internal sealed class FalklandIslands : ICountry { public CountryIdentifier Id => CountryIdentifier.FalklandIslands; From 0b6237ed512ec1ccf00c48da72e68997a13ca7d5 Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Sat, 24 May 2025 13:20:09 +0100 Subject: [PATCH 9/9] add Eswatini test class --- .../Countries/EswatiniTest.cs | 40 +++++++++++++++++++ src/World.Net/Helpers/CountryInitializer.cs | 1 + 2 files changed, 41 insertions(+) create mode 100644 src/World.Net.UnitTests/Countries/EswatiniTest.cs diff --git a/src/World.Net.UnitTests/Countries/EswatiniTest.cs b/src/World.Net.UnitTests/Countries/EswatiniTest.cs new file mode 100644 index 0000000..4ea9a4e --- /dev/null +++ b/src/World.Net.UnitTests/Countries/EswatiniTest.cs @@ -0,0 +1,40 @@ +namespace World.Net.UnitTests.Countries +{ + public class EswatiniTest + { + private const string ESWATINI_NAME = "Eswatini"; + private const int ESWATINI_STATE_COUNT = 4; + private const string ESWATINI_OFFICIAL_NAME = "Kingdom of Eswatini"; + private const string ESWATINI_NATIVE_NAME = "eSwatini"; + private const string ESWATINI_CAPITAL = "Mbabane"; + private const int ESWATINI_NUMERIC_CODE = 748; + private const string ESWATINI_ISO2_CODE = "SZ"; + private const string ESWATINI_ISO3_CODE = "SWZ"; + private readonly string[] ESWATINI_CALLING_CODE = ["268"]; + private static readonly string[] VALID_STATE_TYPES = { "Region" }; + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForEswatini() + { + // Arrange + CountryIdentifier existingCountryId = CountryIdentifier.Eswatini; + + // Act + var country = CountryProvider.GetCountry(existingCountryId); + + // Assert + Assert.Equal(existingCountryId, country.Id); + Assert.Equal(ESWATINI_NAME, country.Name); + Assert.NotNull(country.States); + Assert.Equal(ESWATINI_STATE_COUNT, country.States.Count()); + Assert.Equal(ESWATINI_OFFICIAL_NAME, country.OfficialName); + Assert.Equal(ESWATINI_NATIVE_NAME, country.NativeName); + Assert.Equal(ESWATINI_CAPITAL, country.Capital); + Assert.Equal(ESWATINI_NUMERIC_CODE, country.NumericCode); + Assert.Equal(ESWATINI_ISO2_CODE, country.ISO2Code); + Assert.Equal(ESWATINI_ISO3_CODE, country.ISO3Code); + Assert.All(country.States, state => Assert.Contains(state.Type, VALID_STATE_TYPES)); + Assert.Equal(ESWATINI_CALLING_CODE, country.CallingCode); + } + } +} diff --git a/src/World.Net/Helpers/CountryInitializer.cs b/src/World.Net/Helpers/CountryInitializer.cs index eab88eb..0f9c8e1 100644 --- a/src/World.Net/Helpers/CountryInitializer.cs +++ b/src/World.Net/Helpers/CountryInitializer.cs @@ -73,6 +73,7 @@ public static Dictionary Initialize() { CountryIdentifier.Egypt, new Egypt() }, { CountryIdentifier.Estonia, new Estonia() }, { CountryIdentifier.Ethiopia, new Ethiopia() }, + { CountryIdentifier.Eswatini, new Eswatini() }, { CountryIdentifier.FalklandIslands, new FalklandIslands() }, { CountryIdentifier.FaroeIslands, new FaroeIslands() }, { CountryIdentifier.FijiIslands, new FijiIslands() },