Exemple #1
0
        public void AddProperty_AddsGridColumn()
        {
            Expression <Func <AllTypesView, String> > propertyFunc = (model) => model.Id;

            columns.AddProperty(propertyFunc);

            columns.Received().Add(propertyFunc);
        }
Exemple #2
0
        private void AssertCssClassFor <TProperty>(Expression <Func <AllTypesView, TProperty> > property, String expected)
        {
            columns = SubstituteColumns <AllTypesView, TProperty>(column);
            columns.AddProperty(property);

            column.Received().Css(expected);
        }
Exemple #3
0
 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)));
 }