public void Ctor2 () { Option o = new Option ("Text", "Value"); Assert.AreEqual ("Text", o.Text, "A1"); Assert.AreEqual ("Value", o.Value, "A2"); }
public void Ctor1 () { Option o = new Option (); Assert.AreEqual ("", o.Text, "A1"); Assert.AreEqual ("", o.Value, "A2"); }
public void Properties () { Option o = new Option (); // non ctor defaults Assert.AreEqual ("", o.CssClass, "A1"); // get/set o.Text = "Text"; Assert.AreEqual ("Text", o.Text, "A2"); o.Value = "Value"; Assert.AreEqual ("Value", o.Value, "A3"); o.CssClass = "CssClass"; Assert.AreEqual ("CssClass", o.CssClass, "A4"); // null setters o.Text = null; Assert.AreEqual ("", o.Text, "A2"); o.Value = null; Assert.AreEqual ("", o.Value, "A3"); o.CssClass = null; Assert.AreEqual ("", o.CssClass, "A4"); }