扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
[DeploymentItem("XandY.exe")] [TestMethod()] public void btnWorkOut_ClickTest() { Form1 target = new Form1(); MyTestProject.XandY_Form1Accessor accessor = new MyTestProject.XandY_Form1Accessor(target); object sender = null; // TODO: Initialize to an appropriate value EventArgs e = null; // TODO: Initialize to an appropriate value accessor.btnWorkOut_Click(sender, e); Assert.Inconclusive("A method that does not return a value cannot be verified."); } |
[DeploymentItem("XandY.exe")] [TestMethod()] public void btnWorkOut_ClickTest() { Form1 target = new Form1(); MyTestProject.XandY_Form1Accessor accessor = new MyTestProject.XandY_Form1Accessor(target); object sender = null; // TODO: Initialize to an appropriate value EventArgs e = null; // TODO: Initialize to an appropriate value target.Show(); target.Refresh(); System.Threading.Thread.Sleep(1000); accessor.textBox1.Text = "2"; accessor.textBox2.Text = "4"; accessor.textBox3.Text = "2"; target.Refresh(); System.Threading.Thread.Sleep(1000); accessor.btnWorkOut_Click(sender, e); target.Refresh(); Assert.IsTrue(accessor.d >= 0); Assert.IsNotNull(accessor.xx); Assert.IsNotNull(accessor.xy); Console.WriteLine("X1 = " + accessor.textBox4.Text); Console.WriteLine("X2 = " + accessor.textBox5.Text); System.Threading.Thread.Sleep(1000); target.Close(); } |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者