Exemple #1
0
        public void PhoneNumberUnformated()
        {
            string regexFormat = @"\d{10}";

#pragma warning disable CS0618 // Type or member is obsolete
            Assert.IsTrue(Regex.IsMatch(FakerData.GenerateUSPhoneNumber(), regexFormat));
#pragma warning restore CS0618 // Type or member is obsolete
        }
Exemple #2
0
        public void PhoneNumberFormatted()
        {
            string regexFormat = @"\(?\d{3}\)?-? *\d{3}-? *-?\d{4}";

#pragma warning disable CS0618 // Type or member is obsolete
            Assert.IsTrue(Regex.IsMatch(FakerData.GenerateUSPhoneNumber(true), regexFormat));
#pragma warning restore CS0618 // Type or member is obsolete
        }
Exemple #3
0
        public void PhoneNumberUnformated()
        {
            string regexFormat = @"\d{10}";

            Assert.IsTrue(Regex.IsMatch(FakerData.GenerateUSPhoneNumber(), regexFormat));
        }
Exemple #4
0
        public void PhoneNumberFormatted()
        {
            string regexFormat = @"\(?\d{3}\)?-? *\d{3}-? *-?\d{4}";

            Assert.IsTrue(Regex.IsMatch(FakerData.GenerateUSPhoneNumber(true), regexFormat));
        }