public void TestEvents() { BubbleNet p = new BubbleNet(); LinkButton l = new LinkButton(); l.CommandName = "N"; l.CommandArgument = "A"; l.CausesValidation = false; // avoid an NRE on msft p.Controls.Add(l); got_command = false; got_click = false; got_bubble = false; l.Click += new EventHandler(Event_TestEvents_Click); l.Command += new CommandEventHandler(Event_TestEvents_Command); p.Bubble += new EventHandler(Event_TestEvents_Bubble); ((IPostBackEventHandler)l).RaisePostBackEvent(""); Assert.IsTrue(got_click, "#14"); Assert.IsTrue(got_command, "#15"); Assert.IsTrue(got_bubble, "#16"); }
public void TestEvents () { BubbleNet p = new BubbleNet (); LinkButton l = new LinkButton (); l.CommandName = "N"; l.CommandArgument = "A"; l.CausesValidation = false; // avoid an NRE on msft p.Controls.Add (l); got_command = false; got_click = false; got_bubble = false; l.Click += new EventHandler(Event_TestEvents_Click); l.Command += new CommandEventHandler(Event_TestEvents_Command); p.Bubble += new EventHandler(Event_TestEvents_Bubble); ((IPostBackEventHandler) l).RaisePostBackEvent (""); Assert.IsTrue (got_click, "#14"); Assert.IsTrue (got_command, "#15"); Assert.IsTrue (got_bubble, "#16"); }