Skip to content

Commit 64c3b13

Browse files
committed
Test for GetCountryByCode WithCorrectCode
1 parent a2f99f1 commit 64c3b13

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/CountryData.UnitTests/CountryHelperTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,16 @@ public void GetCountryData_ShouldReturnListOfCountryData()
2121
countryData.Should().NotBeNullOrEmpty();
2222
}
2323

24+
[Theory]
25+
[InlineData("GH")]
26+
[InlineData("US")]
27+
public void GetCountryByCode_WithCorrectCode_ShouldReturnCountry(string shortCode)
28+
{
29+
//Act
30+
var country = _countryHelper.GetCountryByCode(shortCode);
31+
32+
//Assert
33+
country.Should().NotBeNull();
34+
country.CountryShortCode.Should().Be(shortCode);
35+
}
2436
}

0 commit comments

Comments
 (0)