From 45aafa6eb064983acc3fdf41b68cb0959d0af108 Mon Sep 17 00:00:00 2001 From: Trevor Pilley Date: Thu, 31 Oct 2024 13:02:13 +0000 Subject: [PATCH] Parse test for San Marino With and without Italian NDC --- test/PhoneNumbers.Tests/PhoneNumber_Parse_Europe_Tests.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/PhoneNumbers.Tests/PhoneNumber_Parse_Europe_Tests.cs b/test/PhoneNumbers.Tests/PhoneNumber_Parse_Europe_Tests.cs index c452ec597..e395ac480 100644 --- a/test/PhoneNumbers.Tests/PhoneNumber_Parse_Europe_Tests.cs +++ b/test/PhoneNumbers.Tests/PhoneNumber_Parse_Europe_Tests.cs @@ -290,10 +290,12 @@ public void Parse_Value_For_Romania_CallingCode() Assert.Equal(CountryInfo.Romania, phoneNumber.Country); } - [Fact] - public void Parse_Value_For_SanMarino_CallingCode() + [Theory] + [InlineData("+378882555")] // San Marino international + [InlineData("+3780549882555")] // San Marino country code and the Italian area code + public void Parse_Value_For_SanMarino_CallingCode(string value) { - var phoneNumber = PhoneNumber.Parse("+3780549882555"); + var phoneNumber = PhoneNumber.Parse(value); Assert.NotNull(phoneNumber); Assert.Equal(CountryInfo.SanMarino, phoneNumber.Country); }