|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Linq; |
| 4 | +using System.Text; |
| 5 | +using System.Threading.Tasks; |
| 6 | + |
| 7 | +namespace World.Net.UnitTests.Countries |
| 8 | +{ |
| 9 | + public sealed class SamoaTest : AssertCountryTestBase |
| 10 | + { |
| 11 | + private const string COUNTRY_NAME = "Samoa"; |
| 12 | + private const string NATIVE_NAME = "Sāmoa"; |
| 13 | + private const string CAPITAL = "Apia"; |
| 14 | + private const string OFFICIAL_NAME = "Independent State of Samoa"; |
| 15 | + private const string ISO2_CODE = "WS"; |
| 16 | + private const string ISO3_CODE = "WSM"; |
| 17 | + private const int NUMERIC_CODE = 882; |
| 18 | + private readonly string[] CALLING_CODE = ["+685"]; |
| 19 | + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Samoa; |
| 20 | + |
| 21 | + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = |
| 22 | + [ |
| 23 | + new("A'ana", "WS-AA", "District"), |
| 24 | + new("Aiga-i-le-Tai", "WS-AL", "District"), |
| 25 | + new("Atua", "WS-AT", "District"), |
| 26 | + new("Fa'asaleleaga", "WS-FS", "District"), |
| 27 | + new("Gaga'emauga", "WS-GE", "District"), |
| 28 | + new("Gaga'ifomauga", "WS-GF", "District"), |
| 29 | + new("Palauli", "WS-PA", "District"), |
| 30 | + new("Satupa'itea", "WS-SA", "District"), |
| 31 | + new("Tuamasaga", "WS-TU", "District"), |
| 32 | + new("Va'a-o-Fonoti", "WS-VF", "District"), |
| 33 | + new("Vaisigano", "WS-VS", "District") |
| 34 | + ]; |
| 35 | + |
| 36 | + [Fact] |
| 37 | + public void GetCountry_ReturnsCorrectInformation_ForSamoa() |
| 38 | + { |
| 39 | + // Arrange |
| 40 | + // Act |
| 41 | + var country = CountryProvider.GetCountry(EXPECTEDID); |
| 42 | + |
| 43 | + // Assert |
| 44 | + AssertCorrectInformation( |
| 45 | + country, |
| 46 | + EXPECTEDID, |
| 47 | + COUNTRY_NAME, |
| 48 | + OFFICIAL_NAME, |
| 49 | + NATIVE_NAME, |
| 50 | + CAPITAL, |
| 51 | + NUMERIC_CODE, |
| 52 | + ISO2_CODE, |
| 53 | + ISO3_CODE, |
| 54 | + CALLING_CODE, |
| 55 | + EXPECTED_STATES |
| 56 | + ); |
| 57 | + } |
| 58 | + } |
| 59 | + |
| 60 | +} |
0 commit comments