Skip to content

Instantly share code, notes, and snippets.

@hudsonmendes
Created April 4, 2017 20:57
Show Gist options
  • Save hudsonmendes/fc8b994e1a4c69c7274b3f6c9ba6e9a5 to your computer and use it in GitHub Desktop.
Save hudsonmendes/fc8b994e1a4c69c7274b3f6c9ba6e9a5 to your computer and use it in GitHub Desktop.
PhoneNumberFormatterTest.cs
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