public void DataControlField_DefaultProperty()
        {
            DerivedDataControlField field = new DerivedDataControlField();

            Assert.AreEqual("", field.AccessibleHeaderText, "AccessibleHeaderText");
            Assert.AreEqual("System.Web.UI.WebControls.Style", field.ControlStyle.ToString(), "ControlStyle");
            Assert.AreEqual("System.Web.UI.WebControls.TableItemStyle", field.FooterStyle.ToString(), "FooterStyle");
            Assert.AreEqual("", field.FooterText, "FooterText");
            Assert.AreEqual("", field.HeaderImageUrl, "HeaderImageUrl");
            Assert.AreEqual("System.Web.UI.WebControls.TableItemStyle", field.HeaderStyle.ToString(), "HeaderStyle");
            Assert.AreEqual("", field.HeaderText, "HeaderText");
            Assert.AreEqual(true, field.InsertVisible, "InsertVisible");
            Assert.AreEqual("System.Web.UI.WebControls.TableItemStyle", field.ItemStyle.ToString(), "ItemStyle");
            Assert.AreEqual(true, field.ShowHeader, "ShowHeader");
            Assert.AreEqual("", field.SortExpression, "SortExpression");
            Assert.AreEqual(true, field.Visible, "Visible");

            //protected properties
            Assert.AreEqual(null, field.DoControl(), "Control");
            Assert.AreEqual(false, field.DoDesignMode(), "DesignMode");
            Assert.AreEqual(false, field.DoIsTrackingViewState(), "IsTrackingViewState");
            Assert.AreEqual("System.Web.UI.StateBag", field.StateBag.ToString(), "StateBag");
        }
Exemplo n.º 2
0
		public void DataControlField_DefaultProperty ()
		{
			DerivedDataControlField field = new DerivedDataControlField ();
			Assert.AreEqual ("", field.AccessibleHeaderText, "AccessibleHeaderText");
			Assert.AreEqual ("System.Web.UI.WebControls.Style", field.ControlStyle.ToString (), "ControlStyle");
			Assert.AreEqual ("System.Web.UI.WebControls.TableItemStyle", field.FooterStyle.ToString (), "FooterStyle");
			Assert.AreEqual ("", field.FooterText, "FooterText");
			Assert.AreEqual ("", field.HeaderImageUrl, "HeaderImageUrl");
			Assert.AreEqual ("System.Web.UI.WebControls.TableItemStyle", field.HeaderStyle.ToString (), "HeaderStyle");
			Assert.AreEqual ("", field.HeaderText, "HeaderText");
			Assert.AreEqual (true, field.InsertVisible, "InsertVisible");
			Assert.AreEqual ("System.Web.UI.WebControls.TableItemStyle", field.ItemStyle.ToString (), "ItemStyle");
			Assert.AreEqual (true, field.ShowHeader, "ShowHeader");
			Assert.AreEqual ("", field.SortExpression, "SortExpression");
			Assert.AreEqual (true, field.Visible, "Visible");

			//protected properties
			Assert.AreEqual (null, field.DoControl (), "Control");
			Assert.AreEqual (false, field.DoDesignMode (), "DesignMode");
			Assert.AreEqual (false, field.DoIsTrackingViewState (), "IsTrackingViewState");
			Assert.AreEqual ("System.Web.UI.StateBag", field.StateBag.ToString (), "StateBag");
		}