forked from selfmadecode/world.net
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCongoTest.cs
More file actions
39 lines (35 loc) · 1.58 KB
/
CongoTest.cs
File metadata and controls
39 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
namespace World.Net.UnitTests.Countries
{
public sealed class CongoTest
{
private const string CONGO_NAME = "Congo";
private const int CONGO_STATE_COUNT = 12;
private const string CONGO_OFFICIAL_NAME = "Democratic Republic of the Congo";
private const string CONGO_NATIVE_NAME = "République du Congo";
private const string CONGO_CAPITAL = "Brazzaville";
private const int CONGO_NUMERIC_CODE = 178;
private const string CONGO_ISO2_CODE = "CG";
private const string CONGO_ISO3_CODE = "COG";
private const string CONGO_CALLING_CODE = "+242";
[Fact]
public void GetCountry_ReturnsCorrectInformation_ForCongo()
{
// Arrange
CountryIdentifier existingCountryId = CountryIdentifier.Congo;
// Act
var country = CountryProvider.GetCountry(existingCountryId);
//Assert
Assert.Equal(existingCountryId, country.Id);
Assert.Equal(CONGO_NAME, country.Name);
Assert.NotNull(country.States);
Assert.Equal(CONGO_STATE_COUNT, country.States.Count());
Assert.Equal(CONGO_OFFICIAL_NAME, country.OfficialName);
Assert.Equal(CONGO_NATIVE_NAME, country.NativeName);
Assert.Equal(CONGO_CAPITAL, country.Capital);
Assert.Equal(CONGO_NUMERIC_CODE, country.NumericCode);
Assert.Equal(CONGO_ISO2_CODE, country.ISO2Code);
Assert.Equal(CONGO_ISO3_CODE, country.ISO3Code);
Assert.Equal(CONGO_CALLING_CODE, country.CallingCode);
}
}
}