|
| 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 MadagascarTest : AssertCountryTestBase |
| 10 | + { |
| 11 | + public static CountryIdentifier Id => CountryIdentifier.Madagascar; |
| 12 | + public string Name { get; } = "Madagascar"; |
| 13 | + public string OfficialName { get; } = "Republic of Madagascar"; |
| 14 | + public string NativeName { get; } = "Repoblikan’i Madagasikara"; |
| 15 | + public string Capital { get; } = "Antananarivo"; |
| 16 | + public int NumericCode { get; } = 450; |
| 17 | + public string ISO2Code { get; } = "MG"; |
| 18 | + public string ISO3Code { get; } = "MDG"; |
| 19 | + public string[] CallingCode { get; } = ["+261"]; |
| 20 | + private static readonly (string Name, string IsoCode, string Type)[] States = |
| 21 | + [ |
| 22 | + new("Antananarivo", "MG-T", "Province"), |
| 23 | + new("Antsiranana", "MG-D", "Province"), |
| 24 | + new("Fianarantsoa", "MG-F", "Province"), |
| 25 | + new("Mahajanga", "MG-M", "Province"), |
| 26 | + new("Toamasina", "MG-A", "Province"), |
| 27 | + new("Toliara", "MG-U", "Province") |
| 28 | + ]; |
| 29 | + |
| 30 | + |
| 31 | + [Fact] |
| 32 | + public void GetCountry_ReturnsCorrectInformation_ForMadagascar() |
| 33 | + { |
| 34 | + var country = CountryProvider.GetCountry(Id); |
| 35 | + |
| 36 | + AssertCorrectInformation( |
| 37 | + country, |
| 38 | + Id, |
| 39 | + Name, |
| 40 | + OfficialName, |
| 41 | + NativeName, |
| 42 | + Capital, |
| 43 | + NumericCode, |
| 44 | + ISO2Code, |
| 45 | + ISO3Code, |
| 46 | + CallingCode, |
| 47 | + States |
| 48 | + ); |
| 49 | + } |
| 50 | + } |
| 51 | +} |
0 commit comments