|
| 1 | +namespace World.Net.UnitTests.Countries; |
| 2 | + |
| 3 | +public sealed class NigeriaTest : AssertCountryTestBase |
| 4 | +{ |
| 5 | + private const string NIGERIA_COUNTRY_NAME = "Nigeria"; |
| 6 | + private const string NIGERIA_NATIVE_NAME = "Nigeria"; |
| 7 | + private const string NIGERIA_CAPITAL = "Abuja"; |
| 8 | + private const string NIGERIA_OFFICIAL_NAME = "Federal Republic of Nigeria"; |
| 9 | + private const string NIGERIA_ISO2_CODE = "NG"; |
| 10 | + private const string NIGERIA_ISO3_CODE = "NGA"; |
| 11 | + private const int NIGERIA_NUMERIC_CODE = 566; |
| 12 | + private readonly string[] NIGERIA_CALLING_CODE = ["+234"]; |
| 13 | + private const CountryIdentifier EXPECTEDID = CountryIdentifier.Nigeria; |
| 14 | + |
| 15 | + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = |
| 16 | + [ |
| 17 | + new("Abia", "NG-AB", "State"), |
| 18 | + new("Adamawa", "NG-AD", "State"), |
| 19 | + new("Akwa Ibom", "NG-AK", "State"), |
| 20 | + new("Anambra", "NG-AN", "State"), |
| 21 | + new("Bauchi", "NG-BA", "State"), |
| 22 | + new("Bayelsa", "NG-BY", "State"), |
| 23 | + new("Benue", "NG-BE", "State"), |
| 24 | + new("Borno", "NG-BO", "State"), |
| 25 | + new("Cross River", "NG-CR", "State"), |
| 26 | + new("Delta", "NG-DE", "State"), |
| 27 | + new("Ebonyi", "NG-EB", "State"), |
| 28 | + new("Edo", "NG-ED", "State"), |
| 29 | + new("Ekiti", "NG-EK", "State"), |
| 30 | + new("Enugu", "NG-EN", "State"), |
| 31 | + new("Gombe", "NG-GO", "State"), |
| 32 | + new("Imo", "NG-IM", "State"), |
| 33 | + new("Jigawa", "NG-JI", "State"), |
| 34 | + new("Kaduna", "NG-KD", "State"), |
| 35 | + new("Kano", "NG-KN", "State"), |
| 36 | + new("Katsina", "NG-KT", "State"), |
| 37 | + new("Kebbi", "NG-KE", "State"), |
| 38 | + new("Kogi", "NG-KO", "State"), |
| 39 | + new("Kwara", "NG-KW", "State"), |
| 40 | + new("Lagos", "NG-LA", "State"), |
| 41 | + new("Nasarawa", "NG-NA", "State"), |
| 42 | + new("Niger", "NG-NI", "State"), |
| 43 | + new("Ogun", "NG-OG", "State"), |
| 44 | + new("Ondo", "NG-ON", "State"), |
| 45 | + new("Osun", "NG-OS", "State"), |
| 46 | + new("Oyo", "NG-OY", "State"), |
| 47 | + new("Plateau", "NG-PL", "State"), |
| 48 | + new("Rivers", "NG-RI", "State"), |
| 49 | + new("Sokoto", "NG-SO", "State"), |
| 50 | + new("Taraba", "NG-TA", "State"), |
| 51 | + new("Yobe", "NG-YO", "State"), |
| 52 | + new("Zamfara", "NG-ZA", "State"), |
| 53 | + new("Federal Capital Territory", "NG-FC", "Federal Capital Territory") |
| 54 | + ]; |
| 55 | + |
| 56 | + [Fact] |
| 57 | + public void GetCountry_ReturnsCorrectInformation_ForNigeria() |
| 58 | + { |
| 59 | + // Arrange |
| 60 | + // Act |
| 61 | + var country = CountryProvider.GetCountry(EXPECTEDID); |
| 62 | + |
| 63 | + // Assert |
| 64 | + AssertCorrectInformation( |
| 65 | + country, |
| 66 | + EXPECTEDID, |
| 67 | + NIGERIA_COUNTRY_NAME, |
| 68 | + NIGERIA_OFFICIAL_NAME, |
| 69 | + NIGERIA_NATIVE_NAME, |
| 70 | + NIGERIA_CAPITAL, |
| 71 | + NIGERIA_NUMERIC_CODE, |
| 72 | + NIGERIA_ISO2_CODE, |
| 73 | + NIGERIA_ISO3_CODE, |
| 74 | + NIGERIA_CALLING_CODE, |
| 75 | + EXPECTED_STATES |
| 76 | + ); |
| 77 | + } |
| 78 | +} |
0 commit comments