public void SocialNumber_IsValid_ReturnTrueForValidValue() { //Arrange //Act var result = SocialNumber.IsValid("52812349000"); //Assert Assert.True(result); }
public void SocialNumber_Constructor_ThrowsExceptionForNullValues() { //Arrange //Act //Assert var ex = Assert.Throws <ArgumentNullException>(() => SocialNumber.FromString(null)); Assert.Equal("Value cannot be null. (Parameter 'value')", ex.Message); }
public void SocialNumber_Constructor_InstanceValidValue() { //Arrange //Act var socialNumber = SocialNumber.FromString("203.660.060-37"); //Assert Assert.NotNull(socialNumber); }
public void SocialNumber_Constructor_ThrowsExceptionForInvalidValues(string value) { //Arrange //Act //Assert var ex = Assert.Throws <ArgumentException>(() => SocialNumber.FromString(value)); Assert.Equal($"Invalid number [{value}]", ex.Message); }
public void SocialNumber_IsValid_ReturnTrueForValidValues(string value) { //Arrange //Act var result = SocialNumber.IsValid(value); //Assert Assert.True(result); }