Example #1
0
        public void Should_create_displayfor_builder()
        {
            var column  = new GridBoundColumn <User, bool>(GridTestHelper.CreateGrid <User>(), u => u.Active);
            var builder = column.CreateDisplayBuilder(null);

            builder.ShouldBeType <GridDisplayForCellBuilder <User, bool> >();
        }
Example #2
0
        public void Should_create_template_builder_if_inline_template_is_set()
        {
            var column = new GridBoundColumn <User, bool>(GridTestHelper.CreateGrid <User>(), u => u.Active);

            column.InlineTemplate = delegate { return(null); };
            column.CreateDisplayBuilder(null).ShouldBeType <GridTemplateCellBuilder <User> >();
        }
Example #3
0
        public void Should_not_use_display_for_if_encoded_is_false()
        {
            var column = new GridBoundColumn <User, bool>(GridTestHelper.CreateGrid <User>(), u => u.Active);

            column.Encoded = false;
            var builder = column.CreateDisplayBuilder(null);

            builder.ShouldBeType <GridDataCellBuilder <User, bool> >();
        }
Example #4
0
        public void Should_not_use_display_for_if_format_is_set()
        {
            var column = new GridBoundColumn <User, bool>(GridTestHelper.CreateGrid <User>(), u => u.Active);

            column.Format = "{0}";
            var builder = column.CreateDisplayBuilder(null);

            builder.ShouldBeType <GridDataCellBuilder <User, bool> >();
        }
 public void Should_create_template_builder_if_template_is_set()
 {
     var column = new GridBoundColumn<User, bool>(GridTestHelper.CreateGrid<User>(), u => u.Active);
     column.Template = delegate { };
     column.CreateDisplayBuilder(null).ShouldBeType<GridTemplateCellBuilder<User>>();
 }
 public void Should_not_use_display_for_if_format_is_set()
 {
     var column = new GridBoundColumn<User, bool>(GridTestHelper.CreateGrid<User>(), u => u.Active);
     column.Format = "{0}";
     var builder = column.CreateDisplayBuilder(null);
     builder.ShouldBeType<GridDataCellBuilder<User, bool>>();
 }
 public void Should_not_use_display_for_if_encoded_is_false()
 {
     var column = new GridBoundColumn<User, bool>(GridTestHelper.CreateGrid<User>(), u => u.Active);
     column.Encoded = false;
     var builder = column.CreateDisplayBuilder(null);
     builder.ShouldBeType<GridDataCellBuilder<User, bool>>();
 }
        public void Should_create_displayfor_builder()
        {
            var column = new GridBoundColumn<User, bool>(GridTestHelper.CreateGrid<User>(), u => u.Active);
            var builder = column.CreateDisplayBuilder(null);

            builder.ShouldBeType<GridDisplayForCellBuilder<User, bool>>();
        }