예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public void SocialNumber_Constructor_InstanceValidValue()
        {
            //Arrange
            //Act
            var socialNumber = SocialNumber.FromString("203.660.060-37");

            //Assert
            Assert.NotNull(socialNumber);
        }