|
| 1 | +namespace World.Net.UnitTests.Countries; |
| 2 | + |
| 3 | +public sealed class GeorgiaTest : AssertCountryTestBase |
| 4 | +{ |
| 5 | + private const string GEORGIA_COUNTRY_NAME = "Georgia"; |
| 6 | + private const string GEORGIA_NATIVE_NAME = "საქართველო"; |
| 7 | + private const string GEORGIA_CAPITAL = "Tbilisi"; |
| 8 | + private const string GEORGIA_OFFICIAL_NAME = "Georgia"; |
| 9 | + private const string GEORGIA_ISO2_CODE = "GE"; |
| 10 | + private const string GEORGIA_ISO3_CODE = "GEO"; |
| 11 | + private const int GEORGIA_NUMERIC_CODE = 268; |
| 12 | + private readonly string[] GEORGIA_CALLING_CODE = ["+995"]; |
| 13 | + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Georgia; |
| 14 | + |
| 15 | + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = |
| 16 | + [ |
| 17 | + // Autonomous Republics |
| 18 | + new("Abkhazia", "GE-AB", "Autonomous Republic"), |
| 19 | + new("Adjara", "GE-AJ", "Autonomous Republic"), |
| 20 | + |
| 21 | + // Regions |
| 22 | + new("Guria", "GE-GU", "Region"), |
| 23 | + new("Imereti", "GE-IM", "Region"), |
| 24 | + new("Kakheti", "GE-KA", "Region"), |
| 25 | + new("Kvemo Kartli", "GE-KK", "Region"), |
| 26 | + new("Mtskheta-Mtianeti", "GE-MM", "Region"), |
| 27 | + new("Racha-Lechkhumi and Kvemo Svaneti", "GE-RL", "Region"), |
| 28 | + new("Samegrelo-Zemo Svaneti", "GE-SZ", "Region"), |
| 29 | + new("Samtskhe-Javakheti", "GE-SJ", "Region"), |
| 30 | + new("Shida Kartli", "GE-SK", "Region"), |
| 31 | + |
| 32 | + // Capital city |
| 33 | + new("Tbilisi", "GE-TB", "City") |
| 34 | + ]; |
| 35 | + |
| 36 | + [Fact] |
| 37 | + public void GetCountry_ReturnsCorrectInformation_ForGeorgia() |
| 38 | + { |
| 39 | + // Arrange |
| 40 | + // Act |
| 41 | + var country = CountryProvider.GetCountry(EXPECTEDID); |
| 42 | + |
| 43 | + // Assert |
| 44 | + AssertCorrectInformation( |
| 45 | + country, |
| 46 | + EXPECTEDID, |
| 47 | + GEORGIA_COUNTRY_NAME, |
| 48 | + GEORGIA_OFFICIAL_NAME, |
| 49 | + GEORGIA_NATIVE_NAME, |
| 50 | + GEORGIA_CAPITAL, |
| 51 | + GEORGIA_NUMERIC_CODE, |
| 52 | + GEORGIA_ISO2_CODE, |
| 53 | + GEORGIA_ISO3_CODE, |
| 54 | + GEORGIA_CALLING_CODE, |
| 55 | + EXPECTED_STATES |
| 56 | + ); |
| 57 | + } |
| 58 | +} |
| 59 | + |
0 commit comments