-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBrazilTest.cs
More file actions
38 lines (35 loc) · 1.59 KB
/
Copy pathBrazilTest.cs
File metadata and controls
38 lines (35 loc) · 1.59 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
namespace World.Net.UnitTests.Countries
{
public sealed class BrazilTest
{
private const string BRAZIL_NAME = "Brazil";
private const int BRAZIL_STATE_COUNT = 27;
private const string BRAZIL_OFFICIAL_NAME = "Federative Republic of Brazil";
private const string BRAZIL_NATIVE_NAME = "Brasil";
private const string BRAZIL_CAPITAL = "Brasilia";
private const int BRAZIL_NUMERIC_CODE = 076;
private const string BRAZIL_ISO2_CODE = "BR";
private const string BRAZIL_ISO3_CODE = "BRA";
private readonly string[] BRAZIL_CALLING_CODE = ["+55"];
[Fact]
public void GetCountry_ReturnsCorrectInformation_for_Brazil()
{
// Arrange
CountryIdentifier existingCountryId = CountryIdentifier.Brazil;
// Act
var country = CountryProvider.GetCountry(existingCountryId);
//Assert
Assert.Equal(existingCountryId, country.Id);
Assert.Equal(BRAZIL_NAME, country.Name);
Assert.NotNull(country.States);
Assert.Equal(BRAZIL_STATE_COUNT, country.States.Count());
Assert.Equal(BRAZIL_OFFICIAL_NAME, country.OfficialName);
Assert.Equal(BRAZIL_NATIVE_NAME, country.NativeName);
Assert.Equal(BRAZIL_CAPITAL, country.Capital);
Assert.Equal(BRAZIL_NUMERIC_CODE, country.NumericCode);
Assert.Equal(BRAZIL_ISO2_CODE, country.ISO2Code);
Assert.Equal(BRAZIL_ISO3_CODE, country.ISO3Code);
Assert.Equal(BRAZIL_CALLING_CODE, country.CallingCode);
}
}
}