Ejemplo n.º 1
0
        public void TestClineMixedWithHhLine()
        {
            var row         = _ruleStylerTestsCommon.InitRowMixed();
            var fullBorders = new StringBuilder();

            Dictionary <Row, HorizontalRuleStyler> horizontalRuleStylers = HorizontalRuleStylerFactory.GetBottomHorizontalRuleStyler(row);

            foreach (var horizontalRuleStyler in horizontalRuleStylers)
            {
                fullBorders.Append(horizontalRuleStyler.Value.GetBottomHorizontalRule(horizontalRuleStyler.Key));
            }

            var expected = @"\cdashline{1-2}[1pt/1pt] \cdashline{4-5} \hhline{~~-~~=}";

            Assert.That(fullBorders.ToString(), Is.EqualTo(expected));
        }
Ejemplo n.º 2
0
        private string AppendFullBorderConfig(Row row, bool useBottomRuleFromRow)
        {
            Dictionary <Row, HorizontalRuleStyler> horizontalRuleStylers;
            var fullBorders = new StringBuilder();

            if (useBottomRuleFromRow)
            {
                horizontalRuleStylers = HorizontalRuleStylerFactory.GetBottomHorizontalRuleStyler(row);
                foreach (var horizontalRuleStyler in horizontalRuleStylers)
                {
                    fullBorders.Append(horizontalRuleStyler.Value.GetBottomHorizontalRule(horizontalRuleStyler.Key));
                }
            }
            else
            {
                horizontalRuleStylers = HorizontalRuleStylerFactory.GetTopHorizontalRuleStyler(row);
                foreach (var horizontalRuleStyler in horizontalRuleStylers)
                {
                    fullBorders.Append(horizontalRuleStyler.Value.GetTopHorizontalRule(horizontalRuleStyler.Key));
                }
            }
            return(fullBorders.ToString());
        }