-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAngolaTest.cs
More file actions
40 lines (35 loc) · 1.58 KB
/
AngolaTest.cs
File metadata and controls
40 lines (35 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
namespace World.Net.UnitTests.Countries;
public sealed class AngolaTest
{
private const string ANGOLA_COUNTRY_NAME = "Angola";
private const string ANGOLA_NATIVE_NAME = "Angola";
private const string ANGOLA_CAPITAL = "Luanda";
private const string ANGOLA_OFFICIAL_NAME = "Republic of Angola";
private const string ANGOLA_ISO2_CODE = "AO";
private const string ANGOLA_ISO3_CODE = "AGO";
private const int ANGOLA_NUMERIC_CODE = 024;
private readonly string[] ANGOLA_CALLING_CODE = ["+244"];
private const string ANGOLA_STATE_TYPE = "Province";
[Fact]
public void GetCountry_ReturnsCorrectInformation_ForAngola()
{
// Arrange
CountryIdentifier existingCountryId = CountryIdentifier.Angola;
// Act
var country = CountryProvider.GetCountry(existingCountryId);
//Assert
Assert.NotNull(country);
Assert.Equal(existingCountryId, country.Id);
Assert.Equal(ANGOLA_COUNTRY_NAME, country.Name);
Assert.Equal(ANGOLA_OFFICIAL_NAME, country.OfficialName);
Assert.Equal(ANGOLA_NATIVE_NAME, country.NativeName);
Assert.Equal(ANGOLA_CAPITAL, country.Capital);
Assert.Equal(ANGOLA_NUMERIC_CODE, country.NumericCode);
Assert.Equal(ANGOLA_ISO2_CODE, country.ISO2Code);
Assert.Equal(ANGOLA_ISO3_CODE, country.ISO3Code);
Assert.Equal(ANGOLA_CALLING_CODE, country.CallingCode);
Assert.NotNull(country.States);
Assert.Equal(17, country.States.Count());
Assert.All(country.States, state => Assert.Equal(ANGOLA_STATE_TYPE, state.Type));
}
}