Inheritance: System.Web.UI.WebControls.CheckBoxField
Exemplo n.º 1
0
        public void CheckBoxField_CreateField()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();
            CheckBoxField      blank = (CheckBoxField)field.DoCreateField();

            Assert.IsNotNull(blank, "CreateField");
        }
Exemplo n.º 2
0
        public void CheckBoxField_GetDesignTimeValue()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();
            bool result = (bool)field.DoGetDesignTimeValue();

            Assert.AreEqual(true, result, "GetDesignTimeValue");
        }
Exemplo n.º 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");
        }
Exemplo n.º 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");
        }
Exemplo n.º 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");
        }
Exemplo n.º 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();
        }
Exemplo n.º 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");
        }
Exemplo n.º 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");
        }
Exemplo n.º 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");
		}
Exemplo n.º 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");
		}
Exemplo n.º 23
0
        public void CheckBoxField_ValidateSupportsCallback()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.ValidateSupportsCallback();
        }
Exemplo n.º 24
0
 public void CheckBoxField_GetApplyFormatInEditModeExeption()
 {
     PokerCheckBoxField field = new PokerCheckBoxField();
     bool stab = field.ApplyFormatInEditMode;
 }
		public void CheckBoxField_ValidateSupportsCallback ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.ValidateSupportsCallback ();
		}
Exemplo n.º 26
0
 public void CheckBoxField_GetConvertEmptyStringToNull()
 {
     PokerCheckBoxField field = new PokerCheckBoxField();
     bool stab = field.ConvertEmptyStringToNull;
 }
Exemplo n.º 27
0
        public void CheckBoxField_SetDataFormatString()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.DataFormatString = "";
        }
Exemplo n.º 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");
		}
Exemplo n.º 31
0
        public void CheckBoxField_SetApplyFormatInEditModeExeption()
        {
            PokerCheckBoxField field = new PokerCheckBoxField();

            field.ApplyFormatInEditMode = true;
        }
		public void CheckBoxField_SetHtmlEncode ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.HtmlEncode = true;
		}
Exemplo n.º 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;
		}
Exemplo n.º 35
0
 public void CheckBoxField_GetDataFormatString()
 {
     PokerCheckBoxField field = new PokerCheckBoxField();
     string             res   = field.DataFormatString;
 }
		public void CheckBoxField_SetNullDisplayText ()
		{
			PokerCheckBoxField field = new PokerCheckBoxField ();
			field.NullDisplayText = "";
		}
Exemplo n.º 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;
		}
Exemplo n.º 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"); 
		}