Exemplo n.º 1
0
        public void TableCellMultipleBreakingRules()
        {
            var target = new BasicTableCell
            {
                ContentAreas = new ICellContent[] {
                    new BreakingRuleContentArea(),
                    new BreakingRuleContentArea(),
                    new BreakingRuleContentArea()
                }
            };

            Dictionary <int, List <ICellContent> > actual = target.GetContentAreasInLines();

            Assert.Equal(4, actual.Count);
        }
Exemplo n.º 2
0
        public void TableCellMultipleBreakingRulesButNoContentWillRender()
        {
            var target = new BasicTableCell
            {
                ContentAreas = new ICellContent[] {
                    new BreakingRuleContentArea(),
                    new BreakingRuleContentArea(),
                    new BreakingRuleContentArea()
                }
            };

            Dictionary <int, List <ICellContent> > actual = target.GetContentAreasInLines();

            Assert.True(actual.All(t => t.Value.Count == 0));
        }
Exemplo n.º 3
0
        public void TableCellCorrectlySplitsAtBreakingRule()
        {
            var target = new BasicTableCell
            {
                ContentAreas = new ICellContent[] {
                    new BasicCellContent {
                        Value = "TestCell"
                    },
                    new BreakingRuleContentArea(),
                    new BasicCellContent {
                        Value = "Line2"
                    }
                }
            };

            Dictionary <int, List <ICellContent> > actual = target.GetContentAreasInLines();

            Assert.Equal(2, actual.Count);
        }