public void NorthAmerica_IsFormattedWithCountryCode_WhenPassedTrue() { for (int i = 0; i < sampleSize; i++) { string phone = RandomPhone.NorthAmerica(true); StringAssert.Matches(phone, naPhonePlusCountry, "The randomized phone number does not match the +1(xxx)xxx-xxxx format where `x` is any digit."); } }
public void NorthAmerica_IsFormattedWithoutCountryCode_WhenNoArgumentIsPassed() { for (int i = 0; i < sampleSize; i++) { string phone = RandomPhone.NorthAmerica(); StringAssert.Matches(phone, naPhone, "The randomized phone number does not match the (xxx)xxx-xxxx format where `x` is any digit."); } }