public void BtnClear_click_Test() { var mainForm = new MainForm(); mainForm.TBPath.Text = "sth"; mainForm.GVFields.Rows.Add("test"); mainForm.ErrorLabel.Text = "sth"; var mc = new MainformController(mainForm); mc.BtnClear_click(); Assert.AreEqual(string.Empty, mainForm.TBPath.Text); Assert.AreEqual(string.Empty, mainForm.ErrorLabel.Text); Assert.AreEqual(0, mainForm.GVFields.Rows.Count); }
private void BTNClear_Click(object sender, EventArgs e) { mc.BtnClear_click(); }