public void CountryRegionName_CountryRegionFound_ReturnsName( List <CountryRegion> list ) { //Act string result = AddressExtensions.CountryRegionName( list[0].CountryRegionCode, list); //Assert result.Should().Be(list[0].Name); }
public void CountryRegionName_CountryRegionNotFound_ThrowArgumentNullException( CountryRegion countryRegion ) { //Act Func <string> func = () => AddressExtensions.CountryRegionName( countryRegion.CountryRegionCode, new List <CountryRegion>() ); //Assert func.Should().Throw <ArgumentNullException>() .WithMessage("Value cannot be null. (Parameter 'country')"); }