protected void Page_Load(object sender, EventArgs e) { Button2.Click += Button2_Click; } void Button2_Click(object sender, EventArgs e) { TextBox2.Text = TextBox1.Text; }
[TestMethod] [HostType("ASP.NET")] [UrlToTest("http://localhost/Sample/Default.aspx")] public void Load_Pass() { Page page = testContextInstance.RequestedPage; PrivateObject po = new PrivateObject(page); po.Invoke("Button2_Click", page, EventArgs.Empty); Assert.Inconclusive("Doesnot return anything");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)