Exemple #1
0
        public void RenderCellDirectly()
        {
            Column.Mode = BocCustomColumnDefinitionMode.NoControls;

            IBocColumnRenderer renderer = new BocCustomColumnRenderer(new FakeResourceUrlFactory(), RenderingFeatures.Default, _bocListCssClassDefinition);

            renderer.RenderDataCell(_renderingContext, 0, false, EventArgs);

            var document = Html.GetResultDocument();
            var td       = Html.GetAssertedChildElement(document, "td", 0);

            Html.AssertAttribute(td, "class", _bocListCssClassDefinition.DataCell);
        }
Exemple #2
0
        public void RenderCellWithInnerHtmlControl()
        {
            Column.Mode = BocCustomColumnDefinitionMode.ControlsInAllRows;

            IBocColumnRenderer renderer = new BocCustomColumnRenderer(new FakeResourceUrlFactory(), RenderingFeatures.Default, _bocListCssClassDefinition);
            var args = new BocListDataRowRenderEventArgs(20, EventArgs.BusinessObject, EventArgs.IsEditableRow, EventArgs.IsOddRow);

            renderer.RenderDataCell(_renderingContext, 0, false, args);

            var document = Html.GetResultDocument();
            var td       = Html.GetAssertedChildElement(document, "td", 0);

            Html.AssertAttribute(td, "class", _bocListCssClassDefinition.DataCell);

            var span = Html.GetAssertedChildElement(td, "span", 0);

            Html.AssertAttribute(span, "onclick", "BocList_OnCommandClick();");
        }