|
@@ -20,6 +20,7 @@ namespace Masuit.Tools.Test
|
|
var (expect, match) = "[email protected]".MatchEmail();
|
|
var (expect, match) = "[email protected]".MatchEmail();
|
|
Assert.AreEqual(true, expect);
|
|
Assert.AreEqual(true, expect);
|
|
}
|
|
}
|
|
|
|
+
|
|
[TestMethod]
|
|
[TestMethod]
|
|
public void MatchIdentifyCard_False()
|
|
public void MatchIdentifyCard_False()
|
|
{
|
|
{
|
|
@@ -34,5 +35,25 @@ namespace Masuit.Tools.Test
|
|
{
|
|
{
|
|
Xunit.Assert.True(phone.MatchPhoneNumber());
|
|
Xunit.Assert.True(phone.MatchPhoneNumber());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ [Theory]
|
|
|
|
+ [InlineData("166666666666")]
|
|
|
|
+ [InlineData("199999999996")]
|
|
|
|
+ public void CanNot_MatchPhoneNumber_(string phone)
|
|
|
|
+ {
|
|
|
|
+ Xunit.Assert.False(phone.MatchPhoneNumber());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [Theory]
|
|
|
|
+ [InlineData("010-12345678")]
|
|
|
|
+ [InlineData("0731-87654321")]
|
|
|
|
+ [InlineData("0351-7654321")]
|
|
|
|
+ [InlineData("01012345678")]
|
|
|
|
+ [InlineData("073187654321")]
|
|
|
|
+ [InlineData("03517654321")]
|
|
|
|
+ public void Can_MatchLandline_(string phone)
|
|
|
|
+ {
|
|
|
|
+ Xunit.Assert.True(phone.MatchLandline());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|