示例#1
0
        public void TryParseShouldReturnNullWhenNumberIsInvalid(string value)
        {
            PhoneNumber.TryParse(value, out var number);

            Assert.Null(number);
        }
示例#2
0
        public void TryParseWithValidNumber(string value)
        {
            PhoneNumber.TryParse(value, out var number);

            Assert.Equal("256700192133", number);
        }
示例#3
0
 public void ParseShouldThrowWhenNumberIsInvalid(string value)
 {
     Assert.Throws <FormatException>(() => PhoneNumber.Parse(value));
 }
示例#4
0
        public void ParseWithValidNumber(string value)
        {
            var number = PhoneNumber.Parse(value);

            Assert.Equal("256700192133", number);
        }