diff --git a/src/World.Net.UnitTests/Countries/KyrgyzstanTest.cs b/src/World.Net.UnitTests/Countries/KyrgyzstanTest.cs index 71b958a..68755c6 100644 --- a/src/World.Net.UnitTests/Countries/KyrgyzstanTest.cs +++ b/src/World.Net.UnitTests/Countries/KyrgyzstanTest.cs @@ -1,11 +1,6 @@ -using World.Net; -using World.Net.Countries; -using World.Net.Helpers; -using Xunit; - -namespace World.Net.UnitTests.Countries +namespace World.Net.UnitTests.Countries { - public class KyrgyzstanTest + public class KyrgyzstanTest : AssertCountryTestBase { private const CountryIdentifier ExpectedId = CountryIdentifier.Kyrgyzstan; private const string ExpectedName = "Kyrgyzstan"; @@ -33,24 +28,20 @@ private static readonly (string Name, string IsoCode, string Type)[] ExpectedSta public void GetCountry_ReturnsCorrectInformation_ForKyrgyzstan() { var country = CountryProvider.GetCountry(ExpectedId); - Assert.Equal(ExpectedId, country.Id); - Assert.Equal(ExpectedName, country.Name); - Assert.Equal(ExpectedOfficialName, country.OfficialName); - Assert.Equal(ExpectedNativeName, country.NativeName); - Assert.Equal(ExpectedCapital, country.Capital); - Assert.Equal(ExpectedNumericCode, country.NumericCode); - Assert.Equal(ExpectedISO2Code, country.ISO2Code); - Assert.Equal(ExpectedISO3Code, country.ISO3Code); - Assert.Equal(ExpectedCallingCode, country.CallingCode); - var states = country.States.ToArray(); - Assert.Equal(ExpectedStates.Length, states.Length); - for (int i = 0; i < states.Length; i++) - { - Assert.Equal(ExpectedStates[i].Name, states[i].Name); - Assert.Equal(ExpectedStates[i].IsoCode, states[i].IsoCode); - Assert.Equal(ExpectedStates[i].Type, states[i].Type); - } + AssertCorrectInformation( + country, + ExpectedId, + ExpectedName, + ExpectedOfficialName, + ExpectedNativeName, + ExpectedCapital, + ExpectedNumericCode, + ExpectedISO2Code, + ExpectedISO3Code, + ExpectedCallingCode, + ExpectedStates + ); } } } diff --git a/src/World.Net.UnitTests/Countries/LaosTest.cs b/src/World.Net.UnitTests/Countries/LaosTest.cs index be4dbbc..77cc216 100644 --- a/src/World.Net.UnitTests/Countries/LaosTest.cs +++ b/src/World.Net.UnitTests/Countries/LaosTest.cs @@ -1,6 +1,6 @@ namespace World.Net.UnitTests.Countries { - public class LaosTest + public class LaosTest : AssertCountryTestBase { private const CountryIdentifier ExpectedId = CountryIdentifier.Laos; private const string ExpectedName = "Laos"; @@ -38,24 +38,20 @@ private static readonly (string Name, string IsoCode, string Type)[] ExpectedSta public void GetCountry_ReturnsCorrectInformation_ForLaos() { var country = CountryProvider.GetCountry(ExpectedId); - Assert.Equal(ExpectedId, country.Id); - Assert.Equal(ExpectedName, country.Name); - Assert.Equal(ExpectedOfficialName, country.OfficialName); - Assert.Equal(ExpectedNativeName, country.NativeName); - Assert.Equal(ExpectedCapital, country.Capital); - Assert.Equal(ExpectedNumericCode, country.NumericCode); - Assert.Equal(ExpectedISO2Code, country.ISO2Code); - Assert.Equal(ExpectedISO3Code, country.ISO3Code); - Assert.Equal(ExpectedCallingCode, country.CallingCode); - var states = country.States.ToArray(); - Assert.Equal(ExpectedStates.Length, states.Length); - for (int i = 0; i < states.Length; i++) - { - Assert.Equal(ExpectedStates[i].Name, states[i].Name); - Assert.Equal(ExpectedStates[i].IsoCode, states[i].IsoCode); - Assert.Equal(ExpectedStates[i].Type, states[i].Type); - } + AssertCorrectInformation( + country, + ExpectedId, + ExpectedName, + ExpectedOfficialName, + ExpectedNativeName, + ExpectedCapital, + ExpectedNumericCode, + ExpectedISO2Code, + ExpectedISO3Code, + ExpectedCallingCode, + ExpectedStates + ); } } } diff --git a/src/World.Net.UnitTests/Countries/LatviaTests.cs b/src/World.Net.UnitTests/Countries/LatviaTests.cs index e3b04c4..75d7a00 100644 --- a/src/World.Net.UnitTests/Countries/LatviaTests.cs +++ b/src/World.Net.UnitTests/Countries/LatviaTests.cs @@ -53,7 +53,7 @@ private static readonly (string Name, string IsoCode, string Type)[] ExpectedSta [Fact] - public void GetCountry_ReturnsCorrectInformation_ForLaos() + public void GetCountry_ReturnsCorrectInformation_ForLatvia() { var country = CountryProvider.GetCountry(ExpectedId); diff --git a/src/World.Net.UnitTests/Countries/LibyaTest.cs b/src/World.Net.UnitTests/Countries/LibyaTest.cs new file mode 100644 index 0000000..24e71d3 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/LibyaTest.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public class LibyaTest : AssertCountryTestBase + { + public static CountryIdentifier Id => CountryIdentifier.Libya; + public string Name { get; } = "Libya"; + public string OfficialName { get; } = "State of Libya"; + public string NativeName { get; } = "دولة ليبيا"; + public string Capital { get; } = "Tripoli"; + public int NumericCode { get; } = 434; + public string ISO2Code { get; } = "LY"; + public string ISO3Code { get; } = "LBY"; + public string[] CallingCode { get; } = ["+218"]; + private static readonly (string Name, string IsoCode, string Type)[] States = + [ + new("Al Butnan", "LY-BU", "District"), + new("Al Jabal al Akhdar", "LY-JA", "District"), + new("Al Jabal al Gharbi", "LY-JG", "District"), + new("Al Jafara", "LY-JI", "District"), + new("Al Jufra", "LY-JU", "District"), + new("Al Kufra", "LY-KF", "District"), + new("Al Marj", "LY-MJ", "District"), + new("Al Marqab", "LY-MB", "District"), + new("Al Wahat", "LY-WA", "District"), + new("Nalut", "LY-NL", "District"), + new("Misrata", "LY-MI", "District"), + new("Murzuq", "LY-MQ", "District"), + new("Sabha", "LY-SB", "District"), + new("Sirt", "LY-SR", "District"), + new("Tripoli", "LY-TB", "District"), + new("Wadi al Hayat", "LY-WD", "District"), + new("Wadi ash Shati'", "LY-WS", "District"), + new("Zawiya", "LY-ZA", "District") + ]; + + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForLibya() + { + var country = CountryProvider.GetCountry(Id); + + AssertCorrectInformation( + country, + Id, + Name, + OfficialName, + NativeName, + Capital, + NumericCode, + ISO2Code, + ISO3Code, + CallingCode, + States + ); + } + } +} diff --git a/src/World.Net.UnitTests/Countries/LiechtensteinTest.cs b/src/World.Net.UnitTests/Countries/LiechtensteinTest.cs new file mode 100644 index 0000000..96370d9 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/LiechtensteinTest.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 LiechtensteinTest : AssertCountryTestBase + { + public static CountryIdentifier Id => CountryIdentifier.Liechtenstein; + public string Name { get; } = "Liechtenstein"; + public string OfficialName { get; } = "Principality of Liechtenstein"; + public string NativeName { get; } = "Fürstentum Liechtenstein"; + public string Capital { get; } = "Vaduz"; + public int NumericCode { get; } = 438; + public string ISO2Code { get; } = "LI"; + public string ISO3Code { get; } = "LIE"; + public string[] CallingCode { get; } = ["+423"]; + private static readonly (string Name, string IsoCode, string Type)[] States = + [ + new("Balzers", "LI-01", "Municipality"), + new("Eschen", "LI-02", "Municipality"), + new("Gamprin", "LI-03", "Municipality"), + new("Mauren", "LI-04", "Municipality"), + new("Planken", "LI-05", "Municipality"), + new("Ruggell", "LI-06", "Municipality"), + new("Schaan", "LI-07", "Municipality"), + new("Schellenberg", "LI-08", "Municipality"), + new("Triesen", "LI-09", "Municipality"), + new("Triesenberg", "LI-10", "Municipality"), + new("Vaduz", "LI-11", "Municipality") + ]; + + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForLiechtenstein() + { + var country = CountryProvider.GetCountry(Id); + + AssertCorrectInformation( + country, + Id, + Name, + OfficialName, + NativeName, + Capital, + NumericCode, + ISO2Code, + ISO3Code, + CallingCode, + States + ); + } + } +} diff --git a/src/World.Net.UnitTests/Countries/LithuaniaTest.cs b/src/World.Net.UnitTests/Countries/LithuaniaTest.cs new file mode 100644 index 0000000..1c561b1 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/LithuaniaTest.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public class LithuaniaTest : AssertCountryTestBase + { + public static CountryIdentifier Id => CountryIdentifier.Lithuania; + public string Name { get; } = "Lithuania"; + public string OfficialName { get; } = "Republic of Lithuania"; + public string NativeName { get; } = "Lietuvos Respublika"; + public string Capital { get; } = "Vilnius"; + public int NumericCode { get; } = 440; + public string ISO2Code { get; } = "LT"; + public string ISO3Code { get; } = "LTU"; + public string[] CallingCode { get; } = ["+370"]; + private static readonly (string Name, string IsoCode, string Type)[] States = + [ + new("Alytus County", "LT-AL", "County"), + new("Kaunas County", "LT-KU", "County"), + new("Klaipėda County", "LT-KL", "County"), + new("Marijampolė County", "LT-MR", "County"), + new("Panevėžys County", "LT-PN", "County"), + new("Šiauliai County", "LT-SA", "County"), + new("Tauragė County", "LT-TA", "County"), + new("Telšiai County", "LT-TE", "County"), + new("Utena County", "LT-UT", "County"), + new("Vilnius County", "LT-VL", "County") + ]; + + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForLithuania() + { + var country = CountryProvider.GetCountry(Id); + + AssertCorrectInformation( + country, + Id, + Name, + OfficialName, + NativeName, + Capital, + NumericCode, + ISO2Code, + ISO3Code, + CallingCode, + States + ); + } + } +} diff --git a/src/World.Net.UnitTests/Countries/LuxembourgTest.cs b/src/World.Net.UnitTests/Countries/LuxembourgTest.cs new file mode 100644 index 0000000..f280c2d --- /dev/null +++ b/src/World.Net.UnitTests/Countries/LuxembourgTest.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public class LuxembourgTest : AssertCountryTestBase + { + public static CountryIdentifier Id => CountryIdentifier.Luxembourg; + public string Name { get; } = "Luxembourg"; + public string OfficialName { get; } = "Grand Duchy of Luxembourg"; + public string NativeName { get; } = "Groussherzogtum Lëtzebuerg"; + public string Capital { get; } = "Luxembourg City"; + public int NumericCode { get; } = 442; + public string ISO2Code { get; } = "LU"; + public string ISO3Code { get; } = "LUX"; + public string[] CallingCode { get; } = ["+352"]; + private static readonly (string Name, string IsoCode, string Type)[] States = + [ + new("Capellen", "LU-CA", "Canton"), + new("Clervaux", "LU-CL", "Canton"), + new("Diekirch", "LU-DI", "Canton"), + new("Echternach", "LU-EC", "Canton"), + new("Esch-sur-Alzette", "LU-ES", "Canton"), + new("Grevenmacher", "LU-GR", "Canton"), + new("Luxembourg", "LU-LU", "Canton"), + new("Mersch", "LU-ME", "Canton"), + new("Redange", "LU-RD", "Canton"), + new("Remich", "LU-RM", "Canton"), + new("Vianden", "LU-VD", "Canton"), + new("Wiltz", "LU-WI", "Canton") + ]; + + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForLuxembourg() + { + var country = CountryProvider.GetCountry(Id); + + AssertCorrectInformation( + country, + Id, + Name, + OfficialName, + NativeName, + Capital, + NumericCode, + ISO2Code, + ISO3Code, + CallingCode, + States + ); + } + } +} diff --git a/src/World.Net.UnitTests/Countries/MacauSARTest.cs b/src/World.Net.UnitTests/Countries/MacauSARTest.cs new file mode 100644 index 0000000..ae06448 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MacauSARTest.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 class MacauSARTest : AssertCountryTestBase + { + public static CountryIdentifier Id => CountryIdentifier.MacauSAR; + public string Name { get; } = "Macau S.A.R."; + public string OfficialName { get; } = "Macao Special Administrative Region of the People's Republic of China"; + public string NativeName { get; } = "中華人民共和國澳門特別行政區"; + public string Capital { get; } = "Macau"; + public int NumericCode { get; } = 446; + public string ISO2Code { get; } = "MO"; + public string ISO3Code { get; } = "MAC"; + public string[] CallingCode { get; } = ["+853"]; + private static readonly (string Name, string IsoCode, string Type)[] States = + [ + new("Macau Peninsula", "MO-PN", "Region"), + new("Taipa", "MO-TA", "Region"), + new("Coloane", "MO-CO", "Region"), + new("Cotai", "MO-CT", "Region") + ]; + + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMacauSAR() + { + var country = CountryProvider.GetCountry(Id); + + AssertCorrectInformation( + country, + Id, + Name, + OfficialName, + NativeName, + Capital, + NumericCode, + ISO2Code, + ISO3Code, + CallingCode, + States + ); + } + } +} diff --git a/src/World.Net.UnitTests/Countries/MadagascarTest.cs b/src/World.Net.UnitTests/Countries/MadagascarTest.cs new file mode 100644 index 0000000..77360a9 --- /dev/null +++ b/src/World.Net.UnitTests/Countries/MadagascarTest.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace World.Net.UnitTests.Countries +{ + public class MadagascarTest : AssertCountryTestBase + { + public static CountryIdentifier Id => CountryIdentifier.Madagascar; + public string Name { get; } = "Madagascar"; + public string OfficialName { get; } = "Republic of Madagascar"; + public string NativeName { get; } = "Repoblikan’i Madagasikara"; + public string Capital { get; } = "Antananarivo"; + public int NumericCode { get; } = 450; + public string ISO2Code { get; } = "MG"; + public string ISO3Code { get; } = "MDG"; + public string[] CallingCode { get; } = ["+261"]; + private static readonly (string Name, string IsoCode, string Type)[] States = + [ + new("Antananarivo", "MG-T", "Province"), + new("Antsiranana", "MG-D", "Province"), + new("Fianarantsoa", "MG-F", "Province"), + new("Mahajanga", "MG-M", "Province"), + new("Toamasina", "MG-A", "Province"), + new("Toliara", "MG-U", "Province") + ]; + + + [Fact] + public void GetCountry_ReturnsCorrectInformation_ForMadagascar() + { + var country = CountryProvider.GetCountry(Id); + + AssertCorrectInformation( + country, + Id, + Name, + OfficialName, + NativeName, + Capital, + NumericCode, + ISO2Code, + ISO3Code, + CallingCode, + States + ); + } + } +} diff --git a/src/World.Net.UnitTests/Countries/TheBahamasTest.cs b/src/World.Net.UnitTests/Countries/TheBahamasTest.cs index 17be8bf..4ab4ac0 100644 --- a/src/World.Net.UnitTests/Countries/TheBahamasTest.cs +++ b/src/World.Net.UnitTests/Countries/TheBahamasTest.cs @@ -1,6 +1,6 @@ namespace World.Net.UnitTests.Countries; -public sealed class TheBahamasTest +public sealed class TheBahamasTest : AssertCountryTestBase { private const string THEBAHAMAS_COUNTRY_NAME = "The Bahamas"; private const string THEBAHAMAS_NATIVE_NAME = "Bahamas"; @@ -12,29 +12,76 @@ public sealed class TheBahamasTest private readonly string[] THEBAHAMAS_CALLING_CODE = ["+1 242"]; private const int THEBAHAMAS_STATE_COUNT = 42; private static readonly string[] VALID_STATE_TYPES = { "District", "Island" }; + private const CountryIdentifier ExpectedId = CountryIdentifier.Bahamas; + private readonly static (string Name, string IsoCode, string Type)[] ExpectedStates = + [ + ("Acklins", "AK", "District"), + ("Acklins and Crooked Islands", "AC", "District"), + ("Berry Islands", "BY", "District"), + ("Bimini", "BI", "District"), + ("Black Point", "BP", "District"), + ("Cat Island", "CI", "District"), + ("Central Abaco", "CO", "District"), + ("Central Andros", "CS", "District"), + ("Central Eleuthera", "CE", "District"), + ("Crooked Island", "CK", "District"), + ("East Grand Bahama", "EG", "District"), + ("Exuma", "EX", "District"), + ("Freeport", "FP", "District"), + ("Fresh Creek", "FC", "District"), + ("Governor’s Harbour", "GH", "District"), + ("Grand Cay", "GC", "District"), + ("Green Turtle Cay", "GT", "District"), + ("Harbour Island", "HI", "District"), + ("High Rock", "HR", "District"), + ("Hope Town", "HT", "District"), + ("Inagua", "IN", "District"), + ("Kemps Bay", "KB", "District"), + ("Long Island", "LI", "District"), + ("Mangrove Cay", "MC", "District"), + ("Marsh Harbour", "MH", "District"), + ("Mayaguana", "MG", "District"), + ("New Providence", "NP", "Island"), + ("Nichollstown and Berry Islands", "NB", "District"), + ("North Abaco", "NO", "District"), + ("North Andros", "NS", "District"), + ("North Eleuthera", "NE", "District"), + ("Ragged Island", "RI", "District"), + ("Rock Sound", "RS", "District"), + ("Rum Cay", "RC", "District"), + ("San Salvador and Rum Cay", "SR", "District"), + ("San Salvador Island", "SS", "District"), + ("Sandy Point", "SP", "District"), + ("South Abaco", "SO", "District"), + ("South Andros", "SA", "District"), + ("South Eleuthera", "SE", "District"), + ("Spanish Wells", "SW", "District"), + ("West Grand Bahama", "WG", "District") + ]; [Fact] public void GetCountry_ReturnsCorrectInformation_ForTheBahamas() { // Arrange - CountryIdentifier existingCountryId = CountryIdentifier.Bahamas; - // Act - var country = CountryProvider.GetCountry(existingCountryId); + var country = CountryProvider.GetCountry(ExpectedId); // Assert - Assert.NotNull(country); - Assert.Equal(existingCountryId, country.Id); - Assert.Equal(THEBAHAMAS_COUNTRY_NAME, country.Name); - Assert.Equal(THEBAHAMAS_OFFICIAL_NAME, country.OfficialName); - Assert.Equal(THEBAHAMAS_NATIVE_NAME, country.NativeName); - Assert.Equal(THEBAHAMAS_CAPITAL, country.Capital); - Assert.Equal(THEBAHAMAS_NUMERIC_CODE, country.NumericCode); - Assert.Equal(THEBAHAMAS_ISO2_CODE, country.ISO2Code); - Assert.Equal(THEBAHAMAS_ISO3_CODE, country.ISO3Code); - Assert.Equal(THEBAHAMAS_CALLING_CODE, country.CallingCode); - Assert.NotNull(country.States); Assert.Equal(THEBAHAMAS_STATE_COUNT, country.States.Count()); Assert.All(country.States, state => Assert.Contains(state.Type, VALID_STATE_TYPES)); + + AssertCorrectInformation( + country, + ExpectedId, + THEBAHAMAS_COUNTRY_NAME, + THEBAHAMAS_OFFICIAL_NAME, + THEBAHAMAS_NATIVE_NAME, + THEBAHAMAS_CAPITAL, + THEBAHAMAS_NUMERIC_CODE, + THEBAHAMAS_ISO2_CODE, + THEBAHAMAS_ISO3_CODE, + THEBAHAMAS_CALLING_CODE, + ExpectedStates + ); } } diff --git a/src/World.Net.UnitTests/Countries/TimorLesteTest.cs b/src/World.Net.UnitTests/Countries/TimorLesteTest.cs index d65fb2e..0a3866c 100644 --- a/src/World.Net.UnitTests/Countries/TimorLesteTest.cs +++ b/src/World.Net.UnitTests/Countries/TimorLesteTest.cs @@ -1,6 +1,6 @@ namespace World.Net.UnitTests.Countries; -public sealed class TimorLesteTest +public sealed class TimorLesteTest : AssertCountryTestBase { private const string TIMORLESTE_COUNTRY_NAME = "Timor-Leste"; private const string TIMORLESTE_NATIVE_NAME = "Repúblika Demokrátika Timór-Leste"; @@ -12,29 +12,46 @@ public sealed class TimorLesteTest private readonly string[] TIMORLESTE_CALLING_CODE = ["+670"]; private const int TIMORLESTE_STATE_COUNT = 13; // 12 municipalities + 1 special administrative region private static readonly string[] VALID_STATE_TYPES = { "Municipality", "Special Administrative Region" }; + private const CountryIdentifier ExpectedId = CountryIdentifier.TimorLeste; + private static readonly (string Name, string IsoCode, string Type)[] ExpectedStates = + [ + ("Aileu", "TL-AL", "Municipality"), + ("Ainaro", "TL-AN", "Municipality"), + ("Baucau", "TL-BA", "Municipality"), + ("Bobonaro", "TL-BO", "Municipality"), + ("Cova Lima", "TL-CO", "Municipality"), + ("Dili", "TL-DI", "Municipality"), + ("Ermera", "TL-ER", "Municipality"), + ("Lautém", "TL-LA", "Municipality"), + ("Liquiça", "TL-LI", "Municipality"), + ("Manatuto", "TL-MT", "Municipality"), + ("Manufahi", "TL-MF", "Municipality"), + ("Viqueque", "TL-VI", "Municipality"), + ("Oecusse", "TL-OE", "Special Administrative Region") + ]; [Fact] public void GetCountry_ReturnsCorrectInformation_ForTimorLeste() { - // Arrange - CountryIdentifier existingCountryId = CountryIdentifier.TimorLeste; - // Act - var country = CountryProvider.GetCountry(existingCountryId); + var country = CountryProvider.GetCountry(ExpectedId); // Assert - Assert.NotNull(country); - Assert.Equal(existingCountryId, country.Id); - Assert.Equal(TIMORLESTE_COUNTRY_NAME, country.Name); - Assert.Equal(TIMORLESTE_OFFICIAL_NAME, country.OfficialName); - Assert.Equal(TIMORLESTE_NATIVE_NAME, country.NativeName); - Assert.Equal(TIMORLESTE_CAPITAL, country.Capital); - Assert.Equal(TIMORLESTE_NUMERIC_CODE, country.NumericCode); - Assert.Equal(TIMORLESTE_ISO2_CODE, country.ISO2Code); - Assert.Equal(TIMORLESTE_ISO3_CODE, country.ISO3Code); - Assert.Equal(TIMORLESTE_CALLING_CODE, country.CallingCode); - Assert.NotNull(country.States); Assert.Equal(TIMORLESTE_STATE_COUNT, country.States.Count()); Assert.All(country.States, state => Assert.Contains(state.Type, VALID_STATE_TYPES)); + + AssertCorrectInformation( + country, + ExpectedId, + TIMORLESTE_COUNTRY_NAME, + TIMORLESTE_OFFICIAL_NAME, + TIMORLESTE_NATIVE_NAME, + TIMORLESTE_CAPITAL, + TIMORLESTE_NUMERIC_CODE, + TIMORLESTE_ISO2_CODE, + TIMORLESTE_ISO3_CODE, + TIMORLESTE_CALLING_CODE, + ExpectedStates + ); } }