Skip to content

Commit

Permalink
Parse test for San Marino
Browse files Browse the repository at this point in the history
With and without Italian NDC
  • Loading branch information
TrevorPilley committed Oct 31, 2024
1 parent ec50976 commit 45aafa6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/PhoneNumbers.Tests/PhoneNumber_Parse_Europe_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 45aafa6

Please sign in to comment.