* ListBoxTest.cs: the name is the UniqueID, not the ClientID.
* WebControlTest.cs: Attributes statebag is case insensitive.
svn path=/trunk/mcs/; revision=51147
+2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * ListBoxTest.cs: the name is the UniqueID, not the ClientID.
+ * WebControlTest.cs: Attributes statebag is case insensitive.
+
2005-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* ImageButtonTest.cs: test that 'name' attribute is rendered.
#endif
Assert.AreEqual (exp, l.Render ());
}
+
+ class MyNC : Control, INamingContainer {
+ }
+
+ [Test]
+ public void NameIsUniqueID ()
+ {
+ ListBoxPoker list = new ListBoxPoker ();
+ Page page = new Page ();
+ page.ID = "pg";
+ Control ctrl = new MyNC ();
+ ctrl.ID = "ctrl";
+ page.Controls.Add (ctrl);
+ ctrl.Controls.Add (list);
+ Assert.IsTrue (-1 != list.Render ().IndexOf (':'), "unique");
+ }
}
}
c.Load (o);
Assert.IsFalse (c.Enabled, "not enabled");
}
+
+ [Test]
+ public void AttributeIsCaseInsensitive ()
+ {
+ WebControlTestClass c = new WebControlTestClass ();
+ c.Attributes ["hola"] = "hello";
+ c.Attributes ["HOla"] = "hi";
+ Assert.AreEqual ("hi", c.Attributes ["hoLA"], "#01");
+ }
}
}