UnitTest1.cs 513 B

123456789101112131415161718192021222324252627
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using System;
  3. using WindowsFormsApp1;
  4. namespace UnitTestProject1
  5. {
  6. [TestClass]
  7. public class UnitTest1
  8. {
  9. private Form1 form1;
  10. [TestInitialize]
  11. public void Setup()
  12. {
  13. form1 = new Form1();
  14. }
  15. [TestMethod]
  16. public void TestMethod1()
  17. {
  18. string res1 = "2131";
  19. bool result = form1.ANGLTEXT(res1);
  20. Assert.IsTrue(result);
  21. }
  22. }
  23. }