|
| 1 | +namespace World.Net.UnitTests.Countries; |
| 2 | + |
| 3 | +public sealed class GermanyTest : AssertCountryTestBase |
| 4 | +{ |
| 5 | + private const string GERMANY_COUNTRY_NAME = "Germany"; |
| 6 | + private const string GERMANY_NATIVE_NAME = "Deutschland"; |
| 7 | + private const string GERMANY_CAPITAL = "Berlin"; |
| 8 | + private const string GERMANY_OFFICIAL_NAME = "Federal Republic of Germany"; |
| 9 | + private const string GERMANY_ISO2_CODE = "DE"; |
| 10 | + private const string GERMANY_ISO3_CODE = "DEU"; |
| 11 | + private const int GERMANY_NUMERIC_CODE = 276; |
| 12 | + private readonly string[] GERMANY_CALLING_CODE = ["+49"]; |
| 13 | + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Germany; |
| 14 | + |
| 15 | + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = |
| 16 | + [ |
| 17 | + new("Baden-Württemberg", "DE-BW", "State"), |
| 18 | + new("Bavaria", "DE-BY", "State"), |
| 19 | + new("Berlin", "DE-BE", "State"), |
| 20 | + new("Brandenburg", "DE-BB", "State"), |
| 21 | + new("Bremen", "DE-HB", "State"), |
| 22 | + new("Hamburg", "DE-HH", "State"), |
| 23 | + new("Hesse", "DE-HE", "State"), |
| 24 | + new("Lower Saxony", "DE-NI", "State"), |
| 25 | + new("Mecklenburg-Vorpommern", "DE-MV", "State"), |
| 26 | + new("North Rhine-Westphalia", "DE-NW", "State"), |
| 27 | + new("Rhineland-Palatinate", "DE-RP", "State"), |
| 28 | + new("Saarland", "DE-SL", "State"), |
| 29 | + new("Saxony", "DE-SN", "State"), |
| 30 | + new("Saxony-Anhalt", "DE-ST", "State"), |
| 31 | + new("Schleswig-Holstein", "DE-SH", "State"), |
| 32 | + new("Thuringia", "DE-TH", "State") |
| 33 | + ]; |
| 34 | + |
| 35 | + [Fact] |
| 36 | + public void GetCountry_ReturnsCorrectInformation_ForGermany() |
| 37 | + { |
| 38 | + // Arrange |
| 39 | + // Act |
| 40 | + var country = CountryProvider.GetCountry(EXPECTEDID); |
| 41 | + |
| 42 | + // Assert |
| 43 | + AssertCorrectInformation( |
| 44 | + country, |
| 45 | + EXPECTEDID, |
| 46 | + GERMANY_COUNTRY_NAME, |
| 47 | + GERMANY_OFFICIAL_NAME, |
| 48 | + GERMANY_NATIVE_NAME, |
| 49 | + GERMANY_CAPITAL, |
| 50 | + GERMANY_NUMERIC_CODE, |
| 51 | + GERMANY_ISO2_CODE, |
| 52 | + GERMANY_ISO3_CODE, |
| 53 | + GERMANY_CALLING_CODE, |
| 54 | + EXPECTED_STATES |
| 55 | + ); |
| 56 | + } |
| 57 | +} |
0 commit comments