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_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); }