mirror of
https://github.com/ldqk/Masuit.Tools.git
synced 2026-10-19 23:30:04 +08:00
28 lines
735 B
C#
28 lines
735 B
C#
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace Masuit.Tools.UnitTest
|
|
{
|
|
[TestClass]
|
|
public class ExtensionMethodsTest
|
|
{
|
|
[TestMethod]
|
|
public void MatchUrl_True()
|
|
{
|
|
bool expect = "https://git.lug.us-tc.edu.cn/masuit/soft".MatchUrl();
|
|
Assert.AreEqual(true, expect);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void MatchEmail()
|
|
{
|
|
bool expect = "admin@sina.com.cn".MatchEmail();
|
|
Assert.AreEqual(true, expect);
|
|
}
|
|
[TestMethod]
|
|
public void MatchIdentifyCard_False()
|
|
{
|
|
bool expect = "513901199509120610".MatchIdentifyCard();
|
|
Assert.AreEqual(false, expect);
|
|
}
|
|
}
|
|
} |