Created
April 4, 2017 20:57
-
-
Save hudsonmendes/fc8b994e1a4c69c7274b3f6c9ba6e9a5 to your computer and use it in GitHub Desktop.
PhoneNumberFormatterTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xunit; | |
namespace Sample | |
{ | |
public class PhoneNumberFormatterTest | |
{ | |
[Theory] | |
[InlineData( "44274499", "4427-4499")] | |
[InlineData( "944274499", "9-4427-4499")] | |
[InlineData( "1144274499", "11-4427-4499")] | |
[InlineData( "1126635531", "11-2663-5531")] | |
[InlineData( "11944274499", "119-4427-4499")] | |
[InlineData("239841283487123471", "23-9841-2834-8712-3471")] | |
public void Format(string input, string expected) { | |
var actual = new PhoneNumberFormatter(input).Format(); | |
Assert.Matches(expected, actual); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment