|
| 1 | +namespace World.Net.UnitTests.Countries; |
| 2 | + |
| 3 | +public sealed class PapuaNewGuineaTest : AssertCountryTestBase |
| 4 | +{ |
| 5 | + private const string PNG_COUNTRY_NAME = "Papua New Guinea"; |
| 6 | + private const string PNG_NATIVE_NAME = "Papua Niugini"; |
| 7 | + private const string PNG_CAPITAL = "Port Moresby"; |
| 8 | + private const string PNG_OFFICIAL_NAME = "Independent State of Papua New Guinea"; |
| 9 | + private const string PNG_ISO2_CODE = "PG"; |
| 10 | + private const string PNG_ISO3_CODE = "PNG"; |
| 11 | + private const int PNG_NUMERIC_CODE = 598; |
| 12 | + private readonly string[] PNG_CALLING_CODE = ["+675"]; |
| 13 | + private const CountryIdentifier EXPECTEDID = CountryIdentifier.PapuaNewGuinea; |
| 14 | + |
| 15 | + private static readonly (string Name, string IsoCode, string Type)[] EXPECTED_STATES = |
| 16 | + [ |
| 17 | + new("Central", "PG-CN", "Province"), |
| 18 | + new("Gulf", "PG-GL", "Province"), |
| 19 | + new("Milne Bay", "PG-MB", "Province"), |
| 20 | + new("Northern", "PG-NB", "Province"), |
| 21 | + new("Southern Highlands", "PG-SH", "Province"), |
| 22 | + new("Western", "PG-WP", "Province"), |
| 23 | + new("Western Highlands", "PG-WH", "Province"), |
| 24 | + new("Enga", "PG-EN", "Province"), |
| 25 | + new("Eastern Highlands", "PG-EH", "Province"), |
| 26 | + new("Hela", "PG-HE", "Province"), |
| 27 | + new("Morobe", "PG-MO", "Province"), |
| 28 | + new("Madang", "PG-MD", "Province"), |
| 29 | + new("New Ireland", "PG-NI", "Province"), |
| 30 | + new("East New Britain", "PG-EB", "Province"), |
| 31 | + new("West New Britain", "PG-WB", "Province"), |
| 32 | + new("Manus", "PG-MA", "Province"), |
| 33 | + new("Bougainville", "PG-BA", "Autonomous Region"), |
| 34 | + new("Chimbu", "PG-CP", "Province"), |
| 35 | + new("Oro", "PG-OR", "Province"), |
| 36 | + new("Sandaun", "PG-SO", "Province"), |
| 37 | + new("Central", "PG-CE", "Province"), |
| 38 | + new("National Capital District", "PG-NCD", "District") |
| 39 | + ]; |
| 40 | + |
| 41 | + [Fact] |
| 42 | + public void GetCountry_ReturnsCorrectInformation_ForPapuaNewGuinea() |
| 43 | + { |
| 44 | + // Arrange |
| 45 | + // Act |
| 46 | + var country = CountryProvider.GetCountry(EXPECTEDID); |
| 47 | + |
| 48 | + // Assert |
| 49 | + AssertCorrectInformation( |
| 50 | + country, |
| 51 | + EXPECTEDID, |
| 52 | + PNG_COUNTRY_NAME, |
| 53 | + PNG_OFFICIAL_NAME, |
| 54 | + PNG_NATIVE_NAME, |
| 55 | + PNG_CAPITAL, |
| 56 | + PNG_NUMERIC_CODE, |
| 57 | + PNG_ISO2_CODE, |
| 58 | + PNG_ISO3_CODE, |
| 59 | + PNG_CALLING_CODE, |
| 60 | + EXPECTED_STATES |
| 61 | + ); |
| 62 | + } |
| 63 | +} |
0 commit comments