コード例 #1
0
        public void select_data_source_url_with_source_type_and_a_query()
        {
            var targetGrid = new TargetGrid();

            targetGrid.SourceIs <QueryGoodSource>();

            targetGrid.DetermineRunnerType().ShouldEqual(typeof(GridRunner <GridDefTarget, TargetGrid, QueryGoodSource, DifferentClass>));
        }
コード例 #2
0
        public void select_data_source_url_with_source_type_and_no_query()
        {
            var targetGrid = new TargetGrid();

            targetGrid.SourceIs <SimpleGoodSource>();

            targetGrid.DetermineRunnerType().ShouldEqual(typeof(GridRunner <GridDefTarget, TargetGrid, SimpleGoodSource>));
        }
コード例 #3
0
        public void source_happy_path_with_query_object()
        {
            var targetGrid = new TargetGrid();

            targetGrid.SourceIs <QueryGoodSource>();

            targetGrid.SourceType.ShouldEqual(typeof(QueryGoodSource));
        }
コード例 #4
0
        public void is_paged_true_with_paged_source()
        {
            var grid = new TargetGrid();

            grid.SourceIs <PagedSource>();

            grid.IsPaged().ShouldBeTrue();
        }
コード例 #5
0
        public void is_paged_false_with_non_paged_source()
        {
            var grid = new TargetGrid();

            grid.SourceIs <SimpleGoodSource>();

            grid.IsPaged().ShouldBeFalse();
        }
コード例 #6
0
        public void select_data_source_url_with_paged_source()
        {
            var targetGrid = new TargetGrid();

            targetGrid.SourceIs <PagedSource>();

            targetGrid.As <IGridDefinition>().DetermineRunnerType().ShouldEqual(typeof(PagedGridRunner <GridDefTarget, TargetGrid, PagedSource, SpecialPagedQuery>));
        }