public void AddProperty_AddsGridColumn() { Expression <Func <AllTypesView, String> > propertyFunc = (model) => model.Id; columns.AddProperty(propertyFunc); columns.Received().Add(propertyFunc); }
private void AssertCssClassFor <TProperty>(Expression <Func <AllTypesView, TProperty> > property, String expected) { columns = SubstituteColumns <AllTypesView, TProperty>(column); columns.AddProperty(property); column.Received().Css(expected); }
public static IGridColumn <T> AddDateTimeProperty <T>(this IGridColumnCollection <T> column, Expression <Func <T, DateTime?> > property) { return(column .AddProperty(property) .Format(String.Format("{{0:{0} {1}}}", CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern, CultureInfo.CurrentUICulture.DateTimeFormat.ShortTimePattern))); }