Пример #1
0
        public void Filterable()
        {
            FilteringBuilder filteringBuilder = new FilteringBuilder(null);
            FilteringBuilder actionBuilder    = null;
            FilteringConfig  config           = null;

            _builderFactory.FilteringBuilder(Arg.Do <FilteringConfig>(fc => config = fc)).Returns(filteringBuilder);

            ColumnBuilder builder = _builder.Filterable(fb => actionBuilder = fb);

            _builderFactory.Received(1).FilteringBuilder(Arg.Any <FilteringConfig>());
            actionBuilder.Should().BeSameAs(filteringBuilder);
            config.Should().BeSameAs(_columnConfig.Filtering);
            builder.Should().BeSameAs(_builder);
        }
Пример #2
0
 /// <summary>
 /// Configures filtering for the column.
 /// </summary>
 /// <param name="configAction">Configuration action</param>
 /// <returns>The column builder instance.</returns>
 public ColumnBuilder Filterable(Action <FilteringBuilder> configAction)
 {
     configAction(_builderFactory.FilteringBuilder(_config.Filtering));
     return(this);
 }
Пример #3
0
 /// <summary>
 /// Configures filtering for the column.
 /// </summary>
 /// <param name="configAction">Configuration action</param>
 /// <returns>The column builder instance.</returns>
 public MvcCoreBootstrapTableColumnBuilder Filterable(Action <MvcCoreBootstrapTableFilteringBuilder> configAction)
 {
     configAction(_builderFactory.FilteringBuilder(_config.Filtering));
     return(this);
 }