コード例 #1
0
        public void BoundField_AssignPropertyNotWorking()
        {
            PokerBoundField bf = new PokerBoundField();

            bf.ApplyFormatInEditMode = true;
            Assert.AreEqual(true, bf.ApplyFormatInEditMode, "ApplyFormatInEditMode");
        }
コード例 #2
0
        public void BoundField_DefaultPropertyNotWorking()
        {
            PokerBoundField bf = new PokerBoundField();

            Assert.AreEqual(false, bf.ApplyFormatInEditMode, "ApplyFormatInEditMode");
            Assert.AreEqual(true, bf.ConvertEmptyStringToNull, "ConvertEmptyStringToNull");
        }
コード例 #3
0
        public void BoundField_CreateField()
        {
            PokerBoundField bf       = new PokerBoundField();
            BoundField      newfield = (BoundField)bf.DoCreateField();

            Assert.IsNotNull(newfield, "CreateField");
        }
コード例 #4
0
        public void BoundField_SortExpression()
        {
            // Sorting enable = true , link button must be created
            PokerBoundField bf = new PokerBoundField();
            // Header text
            DataControlFieldCell cell = new DataControlFieldCell(null);

            bf.HeaderImageUrl = "";
            bf.SortExpression = "a";
            bf.HeaderText     = "sortbutton";
            bf.Initialize(true, new Control());            // _base._sortingenable set to true
            bf.InitializeCell(cell, DataControlCellType.Header, DataControlRowState.Edit, 1);
            if (cell.Controls [0] is Button)               // mono
            {
                Button lb = (Button)cell.Controls [0];
                Assert.AreEqual("Sort", lb.CommandName, "InitializeCellHeaderSortButtonCommand");
                Assert.AreEqual("a", lb.CommandArgument, "InitializeCellHeaderSortButtonArgument");
                Assert.AreEqual("sortbutton", lb.Text, "InitializeCellHeaderSortButtonText");
            }
            else if (cell.Controls [0] is LinkButton)               // .net
            {
                LinkButton lb = (LinkButton)cell.Controls [0];
                Assert.AreEqual("Sort", lb.CommandName, "InitializeCellHeaderSortButtonCommand");
                Assert.AreEqual("a", lb.CommandArgument, "InitializeCellHeaderSortButtonArgument");
                Assert.AreEqual("sortbutton", lb.Text, "InitializeCellHeaderSortButtonText");
            }
            else
            {
                Assert.Fail("Sort button does not created");
            }
        }
コード例 #5
0
ファイル: BoundFieldTest.cs プロジェクト: pmq20/mono_forked
        public void HtmlEncodeFormatString()
        {
            string formatString = "<script>alert ('{0}');</script>";
            var    bf           = new PokerBoundField();

            Assert.IsTrue(bf.HtmlEncodeFormatString, "#A1-2");
            Assert.IsTrue(bf.HtmlEncode, "#A1-2");
            Assert.IsTrue(bf.DoSupportsHtmlEncode, "#A1-3");

            bf.DataFormatString = formatString;
#if NET_4_0
            Assert.AreEqual("&lt;script&gt;alert (&#39;&lt;test&gt;&#39;);&lt;/script&gt;", bf.DoFormatDataValue("<test>", true), "#A2");
#else
            Assert.AreEqual("&lt;script&gt;alert ('&lt;test&gt;');&lt;/script&gt;", bf.DoFormatDataValue("<test>", true), "#A2");
#endif
            Assert.AreEqual(String.Format(formatString, "<test>"), bf.DoFormatDataValue("<test>", false), "#A3");

            bf.HtmlEncodeFormatString = false;
            Assert.AreEqual("<script>alert ('&lt;test&gt;');</script>", bf.DoFormatDataValue("<test>", true), "#A4");

            var ec = new EncodingTest();
            bf.HtmlEncodeFormatString = true;
#if NET_4_0
            Assert.AreEqual("&lt;script&gt;alert (&#39;&lt;EncodingTest&gt;&amp;&#39;);&lt;/script&gt;", bf.DoFormatDataValue(ec, true), "#A4");
#else
            Assert.AreEqual("&lt;script&gt;alert ('&lt;EncodingTest&gt;&amp;');&lt;/script&gt;", bf.DoFormatDataValue(ec, true), "#A4");
#endif
        }
コード例 #6
0
        public void BoundField_GetDesignTimeValue()
        {
            string          result;
            PokerBoundField bf = new PokerBoundField();

            result = (string)bf.DoGetDesignTimeValue();
            Assert.AreEqual("Databound", result, "GetDesignTimeValue");
        }
コード例 #7
0
        public void BoundField_GetValueNull()
        {
            PokerBoundField      bf = new PokerBoundField();
            SimpleSpreadsheetRow ds = new SimpleSpreadsheetRow(0, null);

            bf.DataField = PokerBoundField.ThisExpression;
            string result = (string)bf.DoGetValue(ds);
        }
コード例 #8
0
        public void BoundField_GetValue()
        {
            PokerBoundField      bf = new PokerBoundField();
            SimpleSpreadsheetRow ds = new SimpleSpreadsheetRow(0, "test");

            bf.DataField = PokerBoundField.ThisExpression;
            string result = (string)bf.DoGetValue(ds);

            Assert.AreEqual("test", result, "GetValueFromIDataItemContainer");
        }
コード例 #9
0
        public void BoundField_GetValueDataItem()
        {
            PokerBoundField     bf = new PokerBoundField();
            ControlWithDataItem ds = new ControlWithDataItem("test");

            bf.DataField = PokerBoundField.ThisExpression;
            string result = (string)bf.DoGetValue(ds);

            Assert.AreEqual("test", result, "GetValueFromIDataItemContainer");
        }
コード例 #10
0
        public void BoundField_ExtractValuesFromCell()
        {
            PokerBoundField      bf         = new PokerBoundField();
            OrderedDictionary    dictionary = new OrderedDictionary();
            DataControlFieldCell cell       = new DataControlFieldCell(null);

            cell.Text = "test";
            bf.ExtractValuesFromCell(dictionary, cell, DataControlRowState.Normal, true);
            Assert.AreEqual(1, dictionary.Count, "ExtractValuesFromCellCount");
            Assert.AreEqual("test", dictionary [0].ToString(), "ExtractValuesFromCellValue");
        }
コード例 #11
0
ファイル: ImageFieldTest.cs プロジェクト: raj581/Marvin
        public void ImageField_Initialize()
        {
            Control control = new Control();

            control.ID = "test";
            PokerBoundField field  = new PokerBoundField();
            bool            result = field.Initialize(true, control);

            Assert.AreEqual(false, result, "Initialize");
            Assert.AreEqual("test", field.GetControl.ID, "InitializeControl");
        }
コード例 #12
0
        public void BoundField_InitializeDataCell()
        {
            PokerBoundField bf = new PokerBoundField();

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

            Assert.AreEqual(0, cell.Controls.Count, "InitializeDataCellControlsBeforeInit");
            bf.DoInitializeDataCell(cell, state);
            Assert.AreEqual(1, cell.Controls.Count, "InitializeDataCellControlsAfterInit");
        }
コード例 #13
0
        public void BoundField_Initialize()
        {
            // This method initilize to private fields in a base class DataControlField
            // Always return false
            PokerBoundField bf      = new PokerBoundField();
            Control         control = new Control();

            control.ID = "test";
            bool res = bf.Initialize(true, control);

            // Assert.AreEqual (false, res, "InitializeResult");
            Assert.AreEqual("test", bf.GetControl.ID, "InitializeControl");
        }
コード例 #14
0
        public void BoundField_DefaultProperty()
        {
            PokerBoundField bf = new PokerBoundField();

            Assert.AreEqual("!", PokerBoundField.ThisExpression, "StaticThisExpression");
            Assert.AreEqual("", bf.DataField, "DataField");
            Assert.AreEqual("", bf.DataFormatString, "DataFormatString");
            Assert.AreEqual("", bf.HeaderText, "HeaderText");
            Assert.AreEqual(true, bf.HtmlEncode, "HtmlEncode");
            Assert.AreEqual("", bf.NullDisplayText, "NullDisplayText");
            Assert.AreEqual(false, bf.ReadOnly, "ReadOnly");

            //Protected
            Assert.AreEqual(true, bf.DoSupportsHtmlEncode, "SupportsHtmlEncode");
        }
コード例 #15
0
        public void BoundField_FormatDataValue()
        {
            string          result;
            PokerBoundField bf = new PokerBoundField();

            bf.NullDisplayText = "NullDisplayText";
            result             = bf.DoFormatDataValue(null, false);
            Assert.AreEqual("NullDisplayText", result, "FormatDataValueNullDataValue");

            result = bf.DoFormatDataValue("test", true);
            Assert.AreEqual("test", result, "FormatDataValueTextDataValue");

            result = bf.DoFormatDataValue("", true);
            Assert.AreEqual("NullDisplayText", result, "FormatEmptyDataValue");

            bf.DataFormatString = "-{0,8:G}-";
            result = bf.DoFormatDataValue(10, false);
            Assert.AreEqual("-      10-", result, "FormatDataValueWithFormat");
        }
コード例 #16
0
        public void BoundField_AssignProperty()
        {
            PokerBoundField bf = new PokerBoundField();

            bf.ConvertEmptyStringToNull = false;
            Assert.AreEqual(false, bf.ConvertEmptyStringToNull, "ConvertEmptyStringToNull");
            bf.DataField = "test";
            Assert.AreEqual("test", bf.DataField, "DataField");
            bf.DataFormatString = "test";
            Assert.AreEqual("test", bf.DataFormatString, "DataFormatString");
            bf.HeaderText = "test";
            Assert.AreEqual("test", bf.HeaderText, "HeaderText");
            bf.HtmlEncode = false;
            Assert.AreEqual(false, bf.HtmlEncode, "HtmlEncode");
            bf.NullDisplayText = "test";
            Assert.AreEqual("test", bf.NullDisplayText, "NullDisplayText");
            bf.ReadOnly = true;
            Assert.AreEqual(true, bf.ReadOnly, "ReadOnly");
        }
コード例 #17
0
        public void BoundField_CopyProperties()
        {
            PokerBoundField bf   = new PokerBoundField();
            BoundField      copy = new BoundField();

            // Look not working property
            // bf.ApplyFormatInEditMode = true;
            bf.ConvertEmptyStringToNull = true;
            bf.DataField        = "test";
            bf.DataFormatString = "test";
            bf.HtmlEncode       = true;
            bf.NullDisplayText  = "test";
            bf.ReadOnly         = true;
            bf.DoCopyProperties(copy);
            // Look not working property
            // Assert.AreEqual (true, copy.ApplyFormatInEditMode, "ApplyFormatInEditMode");
            Assert.AreEqual(true, copy.ConvertEmptyStringToNull, "ConvertEmptyStringToNull");
            Assert.AreEqual("test", copy.DataField, "DataField");
            Assert.AreEqual("test", copy.DataFormatString, "DataFormatString");
            Assert.AreEqual(true, copy.HtmlEncode, "HtmlEncode");
            Assert.AreEqual("test", copy.NullDisplayText, "NullDisplayText");
            Assert.AreEqual(true, copy.ReadOnly, "ReadOnly");
        }
コード例 #18
0
        public void BoundField_InitializeCell()
        {
            PokerBoundField bf = new PokerBoundField();
            // Header text
            DataControlFieldCell cell = new DataControlFieldCell(null);

            bf.HeaderText = "headertext";

            bf.InitializeCell(cell, DataControlCellType.Header, DataControlRowState.Edit, 1);
            Assert.AreEqual("headertext", cell.Text, "InitializeCellHeaderText");
            // Empty header text
            bf.HeaderText = "";
            bf.InitializeCell(cell, DataControlCellType.Header, DataControlRowState.Edit, 1);
            Assert.AreEqual("&nbsp;", cell.Text, "InitializeCellEmpty");

            bf.HeaderText = "headertext";
            // Header image url not empty
            bf.HeaderImageUrl = "headerurl";
            bf.InitializeCell(cell, DataControlCellType.Header, DataControlRowState.Edit, 1);
            if (cell.Controls [0] is Image)
            {
                Image image = (Image)cell.Controls [0];
                Assert.AreEqual("headerurl", image.ImageUrl, "InitializeCellHeaderImageUrl");
            }
            else
            {
                Assert.Fail("Header Image dos not created");
            }

            // Footer empty
            bf.FooterText = "footertext";
            bf.InitializeCell(cell, DataControlCellType.Footer, DataControlRowState.Edit, 1);
            Assert.AreEqual("footertext", cell.Text, "InitializeCellFooterText");
            bf.FooterText = "";
            bf.InitializeCell(cell, DataControlCellType.Footer, DataControlRowState.Edit, 1);
            Assert.AreEqual("&nbsp;", cell.Text, "InitializeCellFooterEmpty");
        }
コード例 #19
0
		public void BoundField_CreateField () {
			PokerBoundField bf = new PokerBoundField ();
			BoundField newfield = (BoundField) bf.DoCreateField ();
			Assert.IsNotNull (newfield, "CreateField");
		}
コード例 #20
0
		public void BoundField_ExtractValuesFromCell () {
			PokerBoundField bf = new PokerBoundField ();
			OrderedDictionary dictionary = new OrderedDictionary ();
			DataControlFieldCell cell = new DataControlFieldCell (null);
			cell.Text = "test";
			bf.ExtractValuesFromCell (dictionary, cell, DataControlRowState.Normal, true);
			Assert.AreEqual (1, dictionary.Count, "ExtractValuesFromCellCount");
			Assert.AreEqual ("test", dictionary [0].ToString (), "ExtractValuesFromCellValue");
		}
コード例 #21
0
		public void BoundField_Initialize () {
			// This method initilize to private fields in a base class DataControlField 
			// Always return false
			PokerBoundField bf = new PokerBoundField ();
			Control control = new Control ();
			control.ID = "test";
			bool res = bf.Initialize (true, control);
			// Assert.AreEqual (false, res, "InitializeResult");
			Assert.AreEqual ("test", bf.GetControl.ID, "InitializeControl");
		}
コード例 #22
0
		public void BoundField_GetValueNull () {
			PokerBoundField bf = new PokerBoundField ();
			SimpleSpreadsheetRow ds = new SimpleSpreadsheetRow (0, null);
			bf.DataField = PokerBoundField.ThisExpression;
			string result = (string) bf.DoGetValue (ds);
		}
コード例 #23
0
		public void BoundField_InitializeCell () {
			PokerBoundField bf = new PokerBoundField ();
			// Header text
			DataControlFieldCell cell = new DataControlFieldCell (null);
			bf.HeaderText = "headertext";

			bf.InitializeCell (cell, DataControlCellType.Header, DataControlRowState.Edit, 1);
			Assert.AreEqual ("headertext", cell.Text, "InitializeCellHeaderText");
			// Empty header text
			bf.HeaderText = "";
			bf.InitializeCell (cell, DataControlCellType.Header, DataControlRowState.Edit, 1);
			Assert.AreEqual ("&nbsp;", cell.Text, "InitializeCellEmpty");

			bf.HeaderText = "headertext";
			// Header image url not empty
			bf.HeaderImageUrl = "headerurl";
			bf.InitializeCell (cell, DataControlCellType.Header, DataControlRowState.Edit, 1);
			if (cell.Controls [0] is Image) {
				Image image = (Image) cell.Controls [0];
				Assert.AreEqual ("headerurl", image.ImageUrl, "InitializeCellHeaderImageUrl");
			}
			else {
				Assert.Fail ("Header Image dos not created");
			}

			// Footer empty
			bf.FooterText = "footertext";
			bf.InitializeCell (cell, DataControlCellType.Footer, DataControlRowState.Edit, 1);
			Assert.AreEqual ("footertext", cell.Text, "InitializeCellFooterText");
			bf.FooterText = "";
			bf.InitializeCell (cell, DataControlCellType.Footer, DataControlRowState.Edit, 1);
			Assert.AreEqual ("&nbsp;", cell.Text, "InitializeCellFooterEmpty");
		}
コード例 #24
0
		public void BoundField_DefaultPropertyNotWorking () {
			PokerBoundField bf = new PokerBoundField ();
			Assert.AreEqual (false, bf.ApplyFormatInEditMode, "ApplyFormatInEditMode");
			Assert.AreEqual (true, bf.ConvertEmptyStringToNull, "ConvertEmptyStringToNull");
		}
コード例 #25
0
		public void ImageField_Initialize ()
		{
			Control control = new Control ();
			control.ID = "test";
			PokerBoundField field = new PokerBoundField ();
			bool result = field.Initialize (true, control);
			Assert.AreEqual (false, result, "Initialize");
			Assert.AreEqual ("test", field.GetControl.ID, "InitializeControl");
		}
コード例 #26
0
		public void BoundField_FormatDataValue () {
			string result;
			PokerBoundField bf = new PokerBoundField ();

			bf.NullDisplayText = "NullDisplayText";
			result = bf.DoFormatDataValue (null, false);
			Assert.AreEqual ("NullDisplayText", result, "FormatDataValueNullDataValue");

			result = bf.DoFormatDataValue ("test", true);
			Assert.AreEqual ("test", result, "FormatDataValueTextDataValue");

			result = bf.DoFormatDataValue ("", true);
			Assert.AreEqual ("NullDisplayText", result, "FormatEmptyDataValue");

			bf.DataFormatString = "-{0,8:G}-";
			result = bf.DoFormatDataValue (10, false);
			Assert.AreEqual ("-      10-", result, "FormatDataValueWithFormat");
		}
コード例 #27
0
		public void BoundField_AssignPropertyNotWorking () {
			PokerBoundField bf = new PokerBoundField ();
			bf.ApplyFormatInEditMode = true;
			Assert.AreEqual (true, bf.ApplyFormatInEditMode, "ApplyFormatInEditMode");
		}
コード例 #28
0
		public void BoundField_GetValueExeption () {
			PokerBoundField bf = new PokerBoundField ();
			bf.DoGetValue (null);
		}
コード例 #29
0
ファイル: BoundFieldTest.cs プロジェクト: nobled/mono
		public void HtmlEncodeFormatString ()
		{
			string formatString = "<script>alert ('{0}');</script>"; 
			var bf = new PokerBoundField ();

			Assert.IsTrue (bf.HtmlEncodeFormatString, "#A1-2");
			Assert.IsTrue (bf.HtmlEncode, "#A1-2");
			Assert.IsTrue (bf.DoSupportsHtmlEncode, "#A1-3");

			bf.DataFormatString = formatString;
#if NET_4_0
			Assert.AreEqual ("&lt;script&gt;alert (&#39;&lt;test&gt;&#39;);&lt;/script&gt;", bf.DoFormatDataValue ("<test>", true), "#A2");
#else
			Assert.AreEqual ("&lt;script&gt;alert ('&lt;test&gt;');&lt;/script&gt;", bf.DoFormatDataValue ("<test>", true), "#A2");
#endif
			Assert.AreEqual (String.Format (formatString, "<test>"), bf.DoFormatDataValue ("<test>", false), "#A3");

			bf.HtmlEncodeFormatString = false;
			Assert.AreEqual ("<script>alert ('&lt;test&gt;');</script>", bf.DoFormatDataValue ("<test>", true), "#A4");

			var ec = new EncodingTest ();
			bf.HtmlEncodeFormatString = true;
#if NET_4_0
			Assert.AreEqual ("&lt;script&gt;alert (&#39;&lt;EncodingTest&gt;&amp;&#39;);&lt;/script&gt;", bf.DoFormatDataValue (ec, true), "#A4");
#else
			Assert.AreEqual ("&lt;script&gt;alert ('&lt;EncodingTest&gt;&amp;');&lt;/script&gt;", bf.DoFormatDataValue (ec, true), "#A4");
#endif
		}
コード例 #30
0
        public void BoundField_OnDataBindFieldExeption()
        {
            PokerBoundField bf = new PokerBoundField();

            bf.bindbutoon.DataBind();
        }
コード例 #31
0
		public void BoundField_GetValueDataItem () {
			PokerBoundField bf = new PokerBoundField ();
			ControlWithDataItem ds = new ControlWithDataItem ("test");
			bf.DataField = PokerBoundField.ThisExpression;
			string result = (string) bf.DoGetValue (ds);
			Assert.AreEqual ("test", result, "GetValueFromIDataItemContainer");
		}
コード例 #32
0
		public void BoundField_GetValue () {
			PokerBoundField bf = new PokerBoundField ();
			SimpleSpreadsheetRow ds = new SimpleSpreadsheetRow (0, "test");
			bf.DataField = PokerBoundField.ThisExpression;
			string result = (string) bf.DoGetValue (ds);
			Assert.AreEqual ("test", result, "GetValueFromIDataItemContainer");
		}
コード例 #33
0
		public void BoundField_AssignProperty () {
			PokerBoundField bf = new PokerBoundField ();
			bf.ConvertEmptyStringToNull = false;
			Assert.AreEqual (false, bf.ConvertEmptyStringToNull, "ConvertEmptyStringToNull");
			bf.DataField = "test";
			Assert.AreEqual ("test", bf.DataField, "DataField");
			bf.DataFormatString = "test";
			Assert.AreEqual ("test", bf.DataFormatString, "DataFormatString");
			bf.HeaderText = "test";
			Assert.AreEqual ("test", bf.HeaderText, "HeaderText");
			bf.HtmlEncode = false;
			Assert.AreEqual (false, bf.HtmlEncode, "HtmlEncode");
			bf.NullDisplayText = "test";
			Assert.AreEqual ("test", bf.NullDisplayText, "NullDisplayText");
			bf.ReadOnly = true;
			Assert.AreEqual (true, bf.ReadOnly, "ReadOnly");
		}
コード例 #34
0
		public void BoundField_CopyProperties () {
			PokerBoundField bf = new PokerBoundField ();
			BoundField copy = new BoundField ();
			// Look not working property
			// bf.ApplyFormatInEditMode = true;
			bf.ConvertEmptyStringToNull = true;
			bf.DataField = "test";
			bf.DataFormatString = "test";
			bf.HtmlEncode = true;
			bf.NullDisplayText = "test";
			bf.ReadOnly = true;
			bf.DoCopyProperties (copy);
			// Look not working property
			// Assert.AreEqual (true, copy.ApplyFormatInEditMode, "ApplyFormatInEditMode");
			Assert.AreEqual (true, copy.ConvertEmptyStringToNull, "ConvertEmptyStringToNull");
			Assert.AreEqual ("test", copy.DataField, "DataField");
			Assert.AreEqual ("test", copy.DataFormatString, "DataFormatString");
			Assert.AreEqual (true, copy.HtmlEncode, "HtmlEncode");
			Assert.AreEqual ("test", copy.NullDisplayText, "NullDisplayText");
			Assert.AreEqual (true, copy.ReadOnly, "ReadOnly");
		}
コード例 #35
0
		public void BoundField_DefaultProperty () {
			PokerBoundField bf = new PokerBoundField ();
			Assert.AreEqual ("!", PokerBoundField.ThisExpression, "StaticThisExpression");
			Assert.AreEqual ("", bf.DataField, "DataField");
			Assert.AreEqual ("", bf.DataFormatString, "DataFormatString");
			Assert.AreEqual ("", bf.HeaderText, "HeaderText");
			Assert.AreEqual (true, bf.HtmlEncode, "HtmlEncode");
			Assert.AreEqual ("", bf.NullDisplayText, "NullDisplayText");
			Assert.AreEqual (false, bf.ReadOnly, "ReadOnly");

			//Protected 
			Assert.AreEqual (true, bf.DoSupportsHtmlEncode, "SupportsHtmlEncode");
		}
コード例 #36
0
		public void BoundField_SortExpression () {
			// Sorting enable = true , link button must be created
			PokerBoundField bf = new PokerBoundField ();
			// Header text
			DataControlFieldCell cell = new DataControlFieldCell (null);

			bf.HeaderImageUrl = "";
			bf.SortExpression = "a";
			bf.HeaderText = "sortbutton";
			bf.Initialize (true, new Control ());    // _base._sortingenable set to true
			bf.InitializeCell (cell, DataControlCellType.Header, DataControlRowState.Edit, 1);
			if (cell.Controls [0] is Button) { // mono
				Button lb = (Button) cell.Controls [0];
				Assert.AreEqual ("Sort", lb.CommandName, "InitializeCellHeaderSortButtonCommand");
				Assert.AreEqual ("a", lb.CommandArgument, "InitializeCellHeaderSortButtonArgument");
				Assert.AreEqual ("sortbutton", lb.Text, "InitializeCellHeaderSortButtonText");

			}
			else if (cell.Controls [0] is LinkButton) { // .net
				LinkButton lb = (LinkButton) cell.Controls [0];
				Assert.AreEqual ("Sort", lb.CommandName, "InitializeCellHeaderSortButtonCommand");
				Assert.AreEqual ("a", lb.CommandArgument, "InitializeCellHeaderSortButtonArgument");
				Assert.AreEqual ("sortbutton", lb.Text, "InitializeCellHeaderSortButtonText");

			}
			else {
				Assert.Fail ("Sort button does not created");
			}
		}
コード例 #37
0
		public void BoundField_InitializeDataCell () {
			PokerBoundField bf = new PokerBoundField ();
			bf.HeaderText = "headertest";
			DataControlFieldCell cell = new DataControlFieldCell (null);
			DataControlRowState state = DataControlRowState.Edit;
			Assert.AreEqual (0, cell.Controls.Count, "InitializeDataCellControlsBeforeInit");
			bf.DoInitializeDataCell (cell, state);
			Assert.AreEqual (1, cell.Controls.Count, "InitializeDataCellControlsAfterInit");
		}
コード例 #38
0
		public void BoundField_GetDesignTimeValue () {
			string result;
			PokerBoundField bf = new PokerBoundField ();
			result = (string) bf.DoGetDesignTimeValue ();
			Assert.AreEqual ("Databound", result, "GetDesignTimeValue");
		}
コード例 #39
0
        public void BoundField_GetValueExeption()
        {
            PokerBoundField bf = new PokerBoundField();

            bf.DoGetValue(null);
        }
コード例 #40
0
		public void BoundField_OnDataBindFieldExeption () {
			PokerBoundField bf = new PokerBoundField ();
			bf.bindbutoon.DataBind ();

		}