|
| 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 class LibyaTest : AssertCountryTestBase |
| 10 | + { |
| 11 | + public static CountryIdentifier Id => CountryIdentifier.Libya; |
| 12 | + public string Name { get; } = "Libya"; |
| 13 | + public string OfficialName { get; } = "State of Libya"; |
| 14 | + public string NativeName { get; } = "دولة ليبيا"; |
| 15 | + public string Capital { get; } = "Tripoli"; |
| 16 | + public int NumericCode { get; } = 434; |
| 17 | + public string ISO2Code { get; } = "LY"; |
| 18 | + public string ISO3Code { get; } = "LBY"; |
| 19 | + public string[] CallingCode { get; } = ["+218"]; |
| 20 | + private static readonly (string Name, string IsoCode, string Type)[] States = |
| 21 | + [ |
| 22 | + new("Al Butnan", "LY-BU", "District"), |
| 23 | + new("Al Jabal al Akhdar", "LY-JA", "District"), |
| 24 | + new("Al Jabal al Gharbi", "LY-JG", "District"), |
| 25 | + new("Al Jafara", "LY-JI", "District"), |
| 26 | + new("Al Jufra", "LY-JU", "District"), |
| 27 | + new("Al Kufra", "LY-KF", "District"), |
| 28 | + new("Al Marj", "LY-MJ", "District"), |
| 29 | + new("Al Marqab", "LY-MB", "District"), |
| 30 | + new("Al Wahat", "LY-WA", "District"), |
| 31 | + new("Nalut", "LY-NL", "District"), |
| 32 | + new("Misrata", "LY-MI", "District"), |
| 33 | + new("Murzuq", "LY-MQ", "District"), |
| 34 | + new("Sabha", "LY-SB", "District"), |
| 35 | + new("Sirt", "LY-SR", "District"), |
| 36 | + new("Tripoli", "LY-TB", "District"), |
| 37 | + new("Wadi al Hayat", "LY-WD", "District"), |
| 38 | + new("Wadi ash Shati'", "LY-WS", "District"), |
| 39 | + new("Zawiya", "LY-ZA", "District") |
| 40 | + ]; |
| 41 | + |
| 42 | + |
| 43 | + [Fact] |
| 44 | + public void GetCountry_ReturnsCorrectInformation_ForLibya() |
| 45 | + { |
| 46 | + var country = CountryProvider.GetCountry(Id); |
| 47 | + |
| 48 | + AssertCorrectInformation( |
| 49 | + country, |
| 50 | + Id, |
| 51 | + Name, |
| 52 | + OfficialName, |
| 53 | + NativeName, |
| 54 | + Capital, |
| 55 | + NumericCode, |
| 56 | + ISO2Code, |
| 57 | + ISO3Code, |
| 58 | + CallingCode, |
| 59 | + States |
| 60 | + ); |
| 61 | + } |
| 62 | + } |
| 63 | +} |
0 commit comments