-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAustraliaTest.cs
More file actions
38 lines (33 loc) · 1.51 KB
/
AustraliaTest.cs
File metadata and controls
38 lines (33 loc) · 1.51 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 AustraliaTest
{
private const string AUSTRALIA_NAME = "Australia";
private const int AUSTRALIA_STATE_COUNT = 8;
private const string AUSTRALIA_OFFICIAL_NAME = "Commonwealth of Australia";
private const string AUSTRALIA_NATIVE_NAME = "Australia";
private const string AUSTRALIA_CAPITAL = "Canberra";
private const int AUSTRALIA_NUMERIC_CODE = 036;
private const string AUSTRALIA_ISO2_CODE = "AU";
private const string AUSTRALIA_ISO3_CODE = "AUS";
private readonly string[] AUSTRALIA_CALLING_CODE = ["+61"];
[Fact]
public void Australia_HasExpectedInformation()
{
// Arrange
CountryIdentifier existingCountryId = CountryIdentifier.Australia;
// Act
var country = CountryProvider.GetCountry(existingCountryId);
//Assert
Assert.Equal(existingCountryId, country.Id);
Assert.Equal(AUSTRALIA_NAME, country.Name);
Assert.NotNull(country.States);
Assert.Equal(AUSTRALIA_STATE_COUNT, country.States.Count());
Assert.Equal(AUSTRALIA_OFFICIAL_NAME, country.OfficialName);
Assert.Equal(AUSTRALIA_NATIVE_NAME, country.NativeName);
Assert.Equal(AUSTRALIA_CAPITAL, country.Capital);
Assert.Equal(AUSTRALIA_NUMERIC_CODE, country.NumericCode);
Assert.Equal(AUSTRALIA_ISO2_CODE, country.ISO2Code);
Assert.Equal(AUSTRALIA_ISO3_CODE, country.ISO3Code);
Assert.Equal(AUSTRALIA_CALLING_CODE, country.CallingCode);
}
}