Skip to content

Commit 56310d1

Browse files
committed
Test for GetCountryByCode With InCorrect Code
1 parent 64c3b13 commit 56310d1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/CountryData.UnitTests/CountryHelperTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,18 @@ public void GetCountryByCode_WithCorrectCode_ShouldReturnCountry(string shortCod
3333
country.Should().NotBeNull();
3434
country.CountryShortCode.Should().Be(shortCode);
3535
}
36+
37+
[Theory]
38+
[InlineData("GHA")]
39+
[InlineData("G")]
40+
[InlineData("USB")]
41+
public void GetCountryByCode_WithInCorrectCode_ShouldReturnNull(string shortCode)
42+
{
43+
//Act
44+
var country = _countryHelper.GetCountryByCode(shortCode);
45+
46+
//Assert
47+
country.Should().BeNull();
48+
}
49+
3650
}

0 commit comments

Comments
 (0)