public void RenderCellDirectly() { Column.Mode = BocCustomColumnDefinitionMode.NoControls; IBocColumnRenderer renderer = new BocCustomColumnQuirksModeRenderer(new FakeResourceUrlFactory(), _bocListQuirksModeCssClassDefinition); renderer.RenderDataCell(_renderingContext, 0, false, EventArgs); var document = Html.GetResultDocument(); var td = Html.GetAssertedChildElement(document, "td", 0); Html.AssertAttribute(td, "class", _bocListQuirksModeCssClassDefinition.DataCellOdd); }
public void RenderCellWithInnerHtmlControl() { Column.Mode = BocCustomColumnDefinitionMode.ControlsInAllRows; IBocColumnRenderer renderer = new BocCustomColumnQuirksModeRenderer(new FakeResourceUrlFactory(), _bocListQuirksModeCssClassDefinition); 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", _bocListQuirksModeCssClassDefinition.DataCellOdd); var span = Html.GetAssertedChildElement(td, "span", 0); Html.AssertAttribute(span, "onclick", "BocList_OnCommandClick();"); }