상속: 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"); 
		}