|
| 1 | +namespace World.Net.UnitTests.Countries; |
| 2 | + |
| 3 | +public sealed class SomaliaTest : AssertCountryTestBase |
| 4 | +{ |
| 5 | + private const string COUNTRY_NAME = "Somalia"; |
| 6 | + private const string NATIVE_NAME = "Soomaaliya"; |
| 7 | + private const string CAPITAL = "Mogadishu"; |
| 8 | + private const string OFFICIAL_NAME = "Federal Republic of Somalia"; |
| 9 | + private const string ISO2_CODE = "SO"; |
| 10 | + private const string ISO3_CODE = "SOM"; |
| 11 | + private const int NUMERIC_CODE = 706; |
| 12 | + private readonly string[] CALLING_CODE = ["+252"]; |
| 13 | + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Somalia; |
| 14 | + |
| 15 | + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = |
| 16 | + { |
| 17 | + ("Awdal", "SO-AW", "Region"), |
| 18 | + ("Bakool", "SO-BK", "Region"), |
| 19 | + ("Banaadir", "SO-BN", "Region"), |
| 20 | + ("Bari", "SO-BR", "Region"), |
| 21 | + ("Bay", "SO-BY", "Region"), |
| 22 | + ("Galguduud", "SO-GA", "Region"), |
| 23 | + ("Gedo", "SO-GE", "Region"), |
| 24 | + ("Hiran", "SO-HI", "Region"), |
| 25 | + ("Lower Juba", "SO-JH", "Region"), |
| 26 | + ("Middle Juba", "SO-JD", "Region"), |
| 27 | + ("Mudug", "SO-MU", "Region"), |
| 28 | + ("Nugal", "SO-NU", "Region"), |
| 29 | + ("Sanaag", "SO-SA", "Region"), |
| 30 | + ("Middle Shabelle", "SO-SD", "Region"), |
| 31 | + ("Lower Shabelle", "SO-SH", "Region"), |
| 32 | + ("Sool", "SO-SO", "Region"), |
| 33 | + ("Togdheer", "SO-TO", "Region"), |
| 34 | + ("Woqooyi Galbeed", "SO-WO", "Region") |
| 35 | +}; |
| 36 | + |
| 37 | + [Fact] |
| 38 | + public void GetCountry_ReturnsCorrectInformation_ForSomalia() |
| 39 | + { |
| 40 | + // Arrange |
| 41 | + // Act |
| 42 | + var country = CountryProvider.GetCountry(EXPECTEDID); |
| 43 | + |
| 44 | + // Assert |
| 45 | + AssertCorrectInformation( |
| 46 | + country, |
| 47 | + EXPECTEDID, |
| 48 | + COUNTRY_NAME, |
| 49 | + OFFICIAL_NAME, |
| 50 | + NATIVE_NAME, |
| 51 | + CAPITAL, |
| 52 | + NUMERIC_CODE, |
| 53 | + ISO2_CODE, |
| 54 | + ISO3_CODE, |
| 55 | + CALLING_CODE, |
| 56 | + EXPECTED_STATES |
| 57 | + ); |
| 58 | + } |
| 59 | +} |
0 commit comments