예제 #1
0
        public void Should_return_sortable_header_builder_if_sortable()
        {
            var grid = GridTestHelper.CreateGrid <Customer>();

            grid.Sorting.Enabled = true;
            var column = new GridBoundColumn <Customer, int>(grid, c => c.Id);

            column.Settings.Sortable = true;
            column.CreateHeaderBuilder().ShouldBeType <GridSortableHeaderCellBuilder>();
        }
예제 #2
0
        public void Should_return_decorated_header_builder_if_hidden()
        {
            var grid   = GridTestHelper.CreateGrid <Customer>();
            var column = new GridBoundColumn <Customer, int>(grid, c => c.Id);

            column.Hidden = true;

            var headerBuilder = column.CreateHeaderBuilder();

            headerBuilder.Decorators.OfType <GridHiddenCellBuilderDecorator>().Any().ShouldBeTrue();
        }
예제 #3
0
        public void Should_return_decorated_header_builder_if_filtarable()
        {
            var grid = GridTestHelper.CreateGrid <Customer>();

            grid.Filtering.Enabled = true;
            var column = new GridBoundColumn <Customer, int>(grid, c => c.Id);

            column.Settings.Filterable = true;

            var headerBuilder = column.CreateHeaderBuilder();

            headerBuilder.Decorators.OfType <GridFilterCellDecorator>().Any().ShouldBeTrue();
        }
 public void Should_return_sortable_header_builder_if_sortable()
 {
     var grid = GridTestHelper.CreateGrid<Customer>();
     grid.Sorting.Enabled = true;
     var column = new GridBoundColumn<Customer, int>(grid, c => c.Id);
     column.Settings.Sortable = true;
     column.CreateHeaderBuilder().ShouldBeType<GridSortableHeaderCellBuilder>();
 }
        public void Should_return_decorated_header_builder_if_hidden()
        {
            var grid = GridTestHelper.CreateGrid<Customer>();
            var column = new GridBoundColumn<Customer, int>(grid, c => c.Id);
            column.Hidden = true;

            var headerBuilder = column.CreateHeaderBuilder();
            headerBuilder.Decorators.OfType<GridHiddenCellBuilderDecorator>().Any().ShouldBeTrue();
        }
        public void Should_return_decorated_header_builder_if_filtarable()
        {
            var grid = GridTestHelper.CreateGrid<Customer>();
            grid.Filtering.Enabled = true;
            var column = new GridBoundColumn<Customer, int>(grid, c => c.Id);
            column.Settings.Filterable = true;

            var headerBuilder = column.CreateHeaderBuilder();
            headerBuilder.Decorators.OfType<GridFilterCellDecorator>().Any().ShouldBeTrue();
        }