public void RenderedAs_SetsIndexedRenderValue() { Func <GridModel, Int32, Object?>?expected = (model, i) => model.Name; Func <GridModel, Int32, Object?>?actual = column.RenderedAs(expected).RenderValue; Assert.Same(expected, actual); }
public void RenderedAs_SetsRenderValue() { Func <GridModel, Object> expected = (model) => model.Name; Func <GridModel, Object> actual = column.RenderedAs(expected).RenderValue; Assert.Same(expected, actual); }
private IGridColumn <TModel> SubstituteColumn <TModel>() { IGridColumn <TModel> column = Substitute.For <IGridColumn <TModel> >(); column.RenderedAs(Arg.Any <Func <TModel, Object> >()).Returns(column); column.Formatted(Arg.Any <String>()).Returns(column); column.Encoded(Arg.Any <Boolean>()).Returns(column); column.Titled(Arg.Any <String>()).Returns(column); column.Css(Arg.Any <String>()).Returns(column); return(column); }