public static void LoadPostData_Load(Page p) { PokerCheckBox b = new PokerCheckBox(); b.AutoPostBack = true; b.ID = "pb"; p.Form.Controls.Add(b); if (p.IsPostBack) { if (WebTest.CurrentTest.UserData == null) { ArrayList list = new ArrayList(); list.Add("PageLoad"); WebTest.CurrentTest.UserData = list; } else { ArrayList list = WebTest.CurrentTest.UserData as ArrayList; if (list == null) { throw new NullReferenceException(); } list.Add("PageLoad"); WebTest.CurrentTest.UserData = list; } } }
public void AddAttributesToRenderTest_2() { PokerCheckBox c = new PokerCheckBox(); string html = c.Render(); Assert.AreEqual(true, c.Checker, "AddAttributesToRender dosn't called fail"); HtmlDiff.AssertAreEqual("<input Attribute=\"AttributeValue\" type=\"checkbox\" style=\"StyleAttribute:StyleAttValue;\" />", html, "Add Attributes To Render fail#2"); }
public void RaisePostDataChangedEvent() { PokerCheckBox o = new PokerCheckBox(); o.CheckedChanged += new EventHandler(o_CheckedChanged); Assert.AreEqual(false, eventCheckedChanged, "RaisePostDataChangedEven#1"); o.RaisePostDataChangedEvent(); Assert.AreEqual(true, eventCheckedChanged, "RaisePostDataChangedEven#2"); }
public static void LoadPostData_Load (Page p) { PokerCheckBox b = new PokerCheckBox (); b.AutoPostBack = true; b.ID = "pb"; p.Form.Controls.Add (b); if (p.IsPostBack) { if (WebTest.CurrentTest.UserData == null) { ArrayList list = new ArrayList (); list.Add ("PageLoad"); WebTest.CurrentTest.UserData = list; } else { ArrayList list = WebTest.CurrentTest.UserData as ArrayList; if (list == null) throw new NullReferenceException (); list.Add ("PageLoad"); WebTest.CurrentTest.UserData = list; } } }
public void RaisePostDataChangedEvent () { PokerCheckBox o = new PokerCheckBox (); o.CheckedChanged += new EventHandler (o_CheckedChanged); Assert.AreEqual (false, eventCheckedChanged, "RaisePostDataChangedEven#1"); o.RaisePostDataChangedEvent (); Assert.AreEqual (true, eventCheckedChanged, "RaisePostDataChangedEven#2"); }
public void AddAttributesToRenderTest_2 () { PokerCheckBox c = new PokerCheckBox (); string html = c.Render (); Assert.AreEqual (true, c.Checker, "AddAttributesToRender dosn't called fail"); HtmlDiff.AssertAreEqual ("<input Attribute=\"AttributeValue\" type=\"checkbox\" style=\"StyleAttribute:StyleAttValue;\" />", html, "Add Attributes To Render fail#2"); }