ExtensionMethodsTest.cs 735 B

12345678910111213141516171819202122232425262728
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. namespace Masuit.Tools.UnitTest
  3. {
  4. [TestClass]
  5. public class ExtensionMethodsTest
  6. {
  7. [TestMethod]
  8. public void MatchUrl_True()
  9. {
  10. bool expect = "https://git.lug.us-tc.edu.cn/masuit/soft".MatchUrl();
  11. Assert.AreEqual(true, expect);
  12. }
  13. [TestMethod]
  14. public void MatchEmail()
  15. {
  16. bool expect = "[email protected]".MatchEmail();
  17. Assert.AreEqual(true, expect);
  18. }
  19. [TestMethod]
  20. public void MatchIdentifyCard_False()
  21. {
  22. bool expect = "513901199509120610".MatchIdentifyCard();
  23. Assert.AreEqual(false, expect);
  24. }
  25. }
  26. }