public void NormalizeForAnyCountry_ValidNationalIdentifier_ReturnsNormalizedValue( string nationalIdentifier, string expected) { var result = NationalIdentifierValidator.NormalizeForAnyCountry(nationalIdentifier); Assert.That(result, Is.EqualTo(expected)); }
public void NormalizeForAnyCountry_InvalidNationalIdentifier_ThrowsArgumentException(string nationalIdentifier) { var ex = Assert.Throws <ArgumentException>(() => NationalIdentifierValidator.NormalizeForAnyCountry(nationalIdentifier)); Assert.That(ex.ParamName, Is.EqualTo("nationalIdentifier"), nameof(ex.ParamName)); Assert.That(ex.Message, Does.Contain(nationalIdentifier ?? string.Empty), nameof(ex.Message)); }