public void IPostBackDataHandler_LoadPostData_NullCollection() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); IPostBackDataHandler pbdh = (rb as IPostBackDataHandler); pbdh.LoadPostData("id1", null); }
// note: this behaviour isn't present in HtmlInputControl public void IDversusValue() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); Assert.IsNull(rb.Value, "Value before"); rb.ID = "id1"; Assert.AreEqual("id1", rb.ID, "ID"); Assert.AreEqual("id1", rb.Value, "Value after"); }
public void RenderAttributes() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.Checked = true; rb.Name = "mono"; rb.Value = "value"; rb.RenderAttributes(); }
public void RaisePostBackEvent() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.ServerChange += new EventHandler(ServerChange); serverChange = false; rb.Raise(); Assert.IsTrue(serverChange, "ServerClick"); }
public void Value_ResetNull() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.Value = "a"; rb.ID = "id1"; rb.Value = null; Assert.AreEqual("id1", rb.ID, "ID"); Assert.AreEqual("id1", rb.Value, "Value"); }
public void Value_Resetting() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.ID = "id1"; Assert.AreEqual("id1", rb.Value, "Value before"); rb.Value = "a"; Assert.AreEqual("id1", rb.ID, "ID"); Assert.AreEqual("a", rb.Value, "Value after"); }
public void LoadPostData() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.ID = "id1"; NameValueCollection nvc = new NameValueCollection(); nvc.Add("id1", "mono"); Assert.IsFalse(rb.LoadPost("id1", nvc), "LoadPostData"); Assert.AreEqual("id1", rb.Value, "Value"); }
public void IPostBackDataHandler_RaisePostBackEvent() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.ServerChange += new EventHandler(ServerChange); IPostBackDataHandler pbdh = (rb as IPostBackDataHandler); serverChange = false; pbdh.RaisePostDataChangedEvent(); Assert.IsTrue(serverChange, "ServerChange"); }
public void RenderValue1() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.ID = "id"; string attrs = rb.RenderAttributes(); Assert.IsTrue(attrs.IndexOf("value=\"id\"") >= 0); rb.Value = "hola<&"; attrs = rb.RenderAttributes(); Assert.IsTrue(attrs.IndexOf("value=\"hola<&\"") >= 0); }
public void IPostBackDataHandler_LoadPostData_WrongId() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.ID = "id1"; IPostBackDataHandler pbdh = (rb as IPostBackDataHandler); NameValueCollection nvc = new NameValueCollection(); nvc.Add("id1", "mono"); Assert.IsFalse(pbdh.LoadPostData("id2", nvc), "LoadPostData"); Assert.AreEqual("id1", rb.Value, "Value"); }
public void IPostBackDataHandler_LoadPostData() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.ID = "id1"; IPostBackDataHandler pbdh = (rb as IPostBackDataHandler); NameValueCollection nvc = new NameValueCollection(); nvc.Add("id1", "id1"); // we didn't change the state of the control Assert.IsFalse(pbdh.LoadPostData("id1", nvc), "LoadPostData"); Assert.AreEqual("id1", rb.Value, "Value"); }
// note: this behaviour isn't present in HtmlInputControl public void IDversusValue () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); Assert.IsNull (rb.Value, "Value before"); rb.ID = "id1"; Assert.AreEqual ("id1", rb.ID, "ID"); Assert.AreEqual ("id1", rb.Value, "Value after"); }
public void RenderAttributes () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.Checked = true; rb.Name = "mono"; rb.Value = "value"; rb.RenderAttributes (); }
public void IPostBackDataHandler_LoadPostData_NullCollection () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); IPostBackDataHandler pbdh = (rb as IPostBackDataHandler); pbdh.LoadPostData ("id1", null); }
public void RenderValue1 () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.ID = "id"; string attrs = rb.RenderAttributes (); Assert.IsTrue (attrs.IndexOf ("value=\"id\"") >= 0); rb.Value = "hola<&"; attrs = rb.RenderAttributes (); Assert.IsTrue (attrs.IndexOf ("value=\"hola<&\"") >= 0); }
public void Value_ResetNull () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.Value = "a"; rb.ID = "id1"; rb.Value = null; Assert.AreEqual ("id1", rb.ID, "ID"); Assert.AreEqual ("id1", rb.Value, "Value"); }
public void IPostBackDataHandler_LoadPostData_WrongId () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.ID = "id1"; IPostBackDataHandler pbdh = (rb as IPostBackDataHandler); NameValueCollection nvc = new NameValueCollection (); nvc.Add ("id1", "mono"); Assert.IsFalse (pbdh.LoadPostData ("id2", nvc), "LoadPostData"); Assert.AreEqual ("id1", rb.Value, "Value"); }
public void LoadPostData () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.ID = "id1"; NameValueCollection nvc = new NameValueCollection (); nvc.Add ("id1", "mono"); Assert.IsFalse (rb.LoadPost ("id1", nvc), "LoadPostData"); Assert.AreEqual ("id1", rb.Value, "Value"); }
public void LoadPostData_NullCollection () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.LoadPost ("id1", null); }
public void RaisePostBackEvent () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.ServerChange += new EventHandler (ServerChange); serverChange = false; rb.Raise (); Assert.IsTrue (serverChange, "ServerClick"); }
public void LoadPostData_NullCollection() { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton(); rb.LoadPost("id1", null); }
public void IPostBackDataHandler_RaisePostBackEvent () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.ServerChange += new EventHandler (ServerChange); IPostBackDataHandler pbdh = (rb as IPostBackDataHandler); serverChange = false; pbdh.RaisePostDataChangedEvent (); Assert.IsTrue (serverChange, "ServerChange"); }
public void Value_Resetting () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.ID = "id1"; Assert.AreEqual ("id1", rb.Value, "Value before"); rb.Value = "a"; Assert.AreEqual ("id1", rb.ID, "ID"); Assert.AreEqual ("a", rb.Value, "Value after"); }
public void IPostBackDataHandler_LoadPostData () { TestHtmlInputRadioButton rb = new TestHtmlInputRadioButton (); rb.ID = "id1"; IPostBackDataHandler pbdh = (rb as IPostBackDataHandler); NameValueCollection nvc = new NameValueCollection (); nvc.Add ("id1", "id1"); // we didn't change the state of the control Assert.IsFalse (pbdh.LoadPostData ("id1", nvc), "LoadPostData"); Assert.AreEqual ("id1", rb.Value, "Value"); }