using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using WindowsFormsApp1; namespace UnitTestProject1 { [TestClass] public class UnitTest1 { private Form1 form1; [TestInitialize] public void Setup() { form1 = new Form1(); } [TestMethod] public void TestMethod1() { string res1 = "2131"; bool result = form1.ANGLTEXT(res1); Assert.IsTrue(result); } } }