Наследование: System.Web.UI.WebControls.CheckBoxField
Пример #1
0
        public void CheckBoxField_CreateField()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();
            CheckBoxField      blank = (CheckBoxField)field.DoCreateField();

            Assert.IsNotNull(blank, "CreateField");
        }
Пример #2
0
        public void CheckBoxField_GetDesignTimeValue()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();
            bool result = (bool)field.DoGetDesignTimeValue();

            Assert.AreEqual(true, result, "GetDesignTimeValue");
        }
Пример #3
0
        public void CheckBoxField_DefaultProperty()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            Assert.AreEqual("", field.DataField, "DataField");
            Assert.AreEqual("", field.Text, "Text");
            Assert.AreEqual(false, field.GetSupportsHtmlEncode, "SupportsHtmlEncode");
        }
Пример #4
0
        public void CheckBoxField_AssignProperty()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.DataField = "test";
            Assert.AreEqual("test", field.DataField, "DataField");
            field.Text = "test";
            Assert.AreEqual("test", field.Text, "Text");
        }
Пример #5
0
        public void CheckBoxField_CopyProperties()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();
            CheckBoxField      copy  = new CheckBoxField();

            field.DataField = "test";
            field.Text      = "test";
            field.DoCopyProperties(copy);
            Assert.AreEqual("test", copy.Text, "Text");
            Assert.AreEqual("test", copy.DataField, "DataField");
        }
Пример #6
0
        public void CheckBoxField_OnDataBindFieldException()
        {
            Page     page = new Page();
            GridView grid = new GridView();

            page.Controls.Add(grid);
            grid.DataSource          = this.CreateDataSource();
            grid.AutoGenerateColumns = false;
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.HeaderText = "field_header";
            field.FooterText = "field_footer";
            field.DataField  = WRONGFIELD;
            grid.Columns.Add(field);
            grid.DataBind();
        }
Пример #7
0
        public void CheckBoxField_OnDataBindField()
        {
            Page     page = new Page();
            GridView grid = new GridView();

            page.Controls.Add(grid);
            grid.DataSource          = this.CreateDataSource();
            grid.AutoGenerateColumns = false;
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.HeaderText = "field_header";
            field.FooterText = "field_footer";
            field.DataField  = FIELDNAME;
            grid.Columns.Add(field);
            grid.DataBind();
            Assert.AreEqual(2, databound, "DataBindField");
            Assert.AreEqual(4, ((Control)grid.Controls[0]).Controls.Count, "DataBindFieldRowCountr");
        }
Пример #8
0
        public void CheckBoxField_ExtractValuesFromCell()
        {
            PokerCheckBoxField   field      = new PokerCheckBoxField();
            OrderedDictionary    dictionary = new OrderedDictionary();
            DataControlFieldCell cell       = new DataControlFieldCell(null);

            cell.Controls.Add(new CheckBox());
            field.ExtractValuesFromCell(dictionary, cell, DataControlRowState.Normal, true);
            Assert.AreEqual(1, dictionary.Count, "ExtractValuesFromCellCount#1");
            Assert.AreEqual("False", dictionary[0].ToString(), "ExtractValuesFromCellValueFalse");
            CheckBox cb = new CheckBox();

            cb.Checked = true;
            cell.Controls.Clear();
            cell.Controls.Add(cb);
            field.ExtractValuesFromCell(dictionary, cell, DataControlRowState.Normal, true);
            Assert.AreEqual(1, dictionary.Count, "ExtractValuesFromCellCount#2");
            Assert.AreEqual("True", dictionary[0].ToString(), "ExtractValuesFromCellValueTrue");
        }
Пример #9
0
        public void CheckBoxField_InitializeDataCell()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.HeaderText = "headertest";
            DataControlFieldCell cell  = new DataControlFieldCell(null);
            DataControlRowState  state = DataControlRowState.Edit;

            Assert.AreEqual(0, cell.Controls.Count, "InitializeDataCellControlsBeforeInit");
            field.DoInitializeDataCell(cell, state);
            Assert.AreEqual(1, cell.Controls.Count, "InitializeDataCellControlsAfterInit");
            Assert.AreEqual("headertest", ((CheckBox)cell.Controls[0]).ToolTip, "InitializeDataCellControlsData");

            cell.Controls.Clear();
            field.DataField = "fake";
            field.Text      = "celltext";
            state           = DataControlRowState.Normal;
            field.DoInitializeDataCell(cell, state);
            Assert.AreEqual(1, cell.Controls.Count, "InitializeDataCellControlsAfterInit");
            Assert.AreEqual("celltext", ((CheckBox)cell.Controls[0]).Text, "InitializeDataCellControlsData");
        }
		public void CheckBoxField_CreateField ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			CheckBoxField blank = (CheckBoxField)field.DoCreateField ();
			Assert.IsNotNull (blank, "CreateField");
		}
		public void CheckBoxField_AssignProperty ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.DataField = "test";
			Assert.AreEqual ("test", field.DataField, "DataField");
			field.Text = "test";
			Assert.AreEqual ("test", field.Text, "Text");
		}
Пример #12
0
        public void CheckBoxField_SetNullDisplayText()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.NullDisplayText = "";
        }
		public void CheckBoxField_InitializeDataCell ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.HeaderText = "headertest";
			DataControlFieldCell cell = new DataControlFieldCell (null);
			DataControlRowState state = DataControlRowState.Edit;
			Assert.AreEqual (0, cell.Controls.Count, "InitializeDataCellControlsBeforeInit");
			field.DoInitializeDataCell (cell, state);
			Assert.AreEqual (1, cell.Controls.Count, "InitializeDataCellControlsAfterInit");
			Assert.AreEqual ("headertest", ((CheckBox)cell.Controls[0]).ToolTip, "InitializeDataCellControlsData");

			cell.Controls.Clear ();
			field.DataField = "fake";
			field.Text = "celltext";
			state = DataControlRowState.Normal;
			field.DoInitializeDataCell (cell, state);
			Assert.AreEqual (1, cell.Controls.Count, "InitializeDataCellControlsAfterInit");
			Assert.AreEqual ("celltext", ((CheckBox) cell.Controls[0]).Text, "InitializeDataCellControlsData");
		}
		public void CheckBoxField_ExtractValuesFromCell ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			OrderedDictionary dictionary = new OrderedDictionary ();
			DataControlFieldCell cell = new DataControlFieldCell (null);
			cell.Controls.Add (new CheckBox ());
			field.ExtractValuesFromCell (dictionary, cell, DataControlRowState.Normal, true);
			Assert.AreEqual (1, dictionary.Count, "ExtractValuesFromCellCount#1");
			Assert.AreEqual ("False", dictionary[0].ToString (), "ExtractValuesFromCellValueFalse");
			CheckBox cb = new CheckBox ();
			cb.Checked = true;
			cell.Controls.Clear ();
			cell.Controls.Add (cb);
			field.ExtractValuesFromCell (dictionary, cell, DataControlRowState.Normal, true);
			Assert.AreEqual (1, dictionary.Count, "ExtractValuesFromCellCount#2");
			Assert.AreEqual ("True", dictionary[0].ToString (), "ExtractValuesFromCellValueTrue");
		}
		public void CheckBoxField_CopyProperties()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			CheckBoxField copy = new CheckBoxField();
			field.DataField = "test";
			field.Text = "test";
			field.DoCopyProperties (copy);
			Assert.AreEqual ("test", copy.Text, "Text");
			Assert.AreEqual ("test", copy.DataField, "DataField");
		}
		public void CheckBoxField_SetDataFormatString ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.DataFormatString = "";
		}
		public void CheckBoxField_SetConvertEmptyStringToNull ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.ConvertEmptyStringToNull = true;
		}
		public void CheckBoxField_GetConvertEmptyStringToNull ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			bool stab = field.ConvertEmptyStringToNull;
		}
		public void CheckBoxField_SetApplyFormatInEditModeExeption ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.ApplyFormatInEditMode = true;
		}
		public void CheckBoxField_GetApplyFormatInEditModeExeption ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			bool stab = field.ApplyFormatInEditMode;
		}
		public void CheckBoxField_OnDataBindFieldException ()
		{
			Page page = new Page ();
			GridView grid = new GridView ();
			page.Controls.Add (grid);
			grid.DataSource = this.CreateDataSource ();
			grid.AutoGenerateColumns = false;
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.HeaderText = "field_header";
			field.FooterText = "field_footer";
			field.DataField = WRONGFIELD;
			grid.Columns.Add (field);
			grid.DataBind ();
		}
		public void CheckBoxField_OnDataBindField ()
		{
			Page page = new Page ();
			GridView grid = new GridView ();
			page.Controls.Add (grid);
			grid.DataSource = this.CreateDataSource ();
			grid.AutoGenerateColumns = false;
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.HeaderText = "field_header";
			field.FooterText = "field_footer";
			field.DataField = FIELDNAME;
			grid.Columns.Add (field);
			grid.DataBind ();
			Assert.AreEqual (2, databound, "DataBindField");
			Assert.AreEqual (4, ((Control) grid.Controls[0]).Controls.Count, "DataBindFieldRowCountr");
		}
Пример #23
0
        public void CheckBoxField_ValidateSupportsCallback()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.ValidateSupportsCallback();
        }
Пример #24
0
 public void CheckBoxField_GetApplyFormatInEditModeExeption()
 {
     PokerCheckBoxField field = new PokerCheckBoxField();
     bool stab = field.ApplyFormatInEditMode;
 }
		public void CheckBoxField_ValidateSupportsCallback ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.ValidateSupportsCallback ();
		}
Пример #26
0
 public void CheckBoxField_GetConvertEmptyStringToNull()
 {
     PokerCheckBoxField field = new PokerCheckBoxField();
     bool stab = field.ConvertEmptyStringToNull;
 }
Пример #27
0
        public void CheckBoxField_SetDataFormatString()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.DataFormatString = "";
        }
Пример #28
0
        public void CheckBoxField_SetHtmlEncode()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.HtmlEncode = true;
        }
		public void CheckBoxField_GetDataFormatString ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			string res = field.DataFormatString;
		}
		public void CheckBoxField_GetDesignTimeValue ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			bool result = (bool)field.DoGetDesignTimeValue ();
			Assert.AreEqual (true, result, "GetDesignTimeValue");
		}
Пример #31
0
        public void CheckBoxField_SetApplyFormatInEditModeExeption()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.ApplyFormatInEditMode = true;
        }
		public void CheckBoxField_SetHtmlEncode ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.HtmlEncode = true;
		}
Пример #33
0
        public void CheckBoxField_SetConvertEmptyStringToNull()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.ConvertEmptyStringToNull = true;
        }
		public void CheckBoxField_GetHtmlEncode ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			bool res = field.HtmlEncode;
		}
Пример #35
0
 public void CheckBoxField_GetDataFormatString()
 {
     PokerCheckBoxField field = new PokerCheckBoxField();
     string             res   = field.DataFormatString;
 }
		public void CheckBoxField_SetNullDisplayText ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.NullDisplayText = "";
		}
Пример #37
0
 public void CheckBoxField_GetHtmlEncode()
 {
     PokerCheckBoxField field = new PokerCheckBoxField();
     bool res = field.HtmlEncode;
 }
		public void CheckBoxField_GetNullDisplayText ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			string res = field.NullDisplayText;
		}
Пример #39
0
 public void CheckBoxField_GetNullDisplayText()
 {
     PokerCheckBoxField field = new PokerCheckBoxField();
     string             res   = field.NullDisplayText;
 }
		public void CheckBoxField_DefaultProperty ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			Assert.AreEqual ("", field.DataField, "DataField");
			Assert.AreEqual ("", field.Text, "Text");
			Assert.AreEqual (false, field.GetSupportsHtmlEncode, "SupportsHtmlEncode"); 
		}