示例#1
0
        public virtual void OneLeafWithFalsePropertyAndCapitalizeStyleTest()
        {
            inlineHelper = new WaitingInlineElementsHelper(null, capitalizeStyle);
            inlineHelper.Add(CreateText("one", false));
            Div div = new Div();

            inlineHelper.FlushHangingLeaves(div);
            String lineResult = GetLine(div);

            NUnit.Framework.Assert.AreEqual("one", lineResult);
        }
示例#2
0
        public virtual void CapitalizeLeafTest()
        {
            inlineHelper = new WaitingInlineElementsHelper(null, capitalizeStyle);
            inlineHelper.Add("one");
            Div div = new Div();

            inlineHelper.FlushHangingLeaves(div);
            String lineResult = GetLine(div);

            NUnit.Framework.Assert.AreEqual("One", lineResult);
        }
示例#3
0
        public virtual void CapitalizeTwoLeavesWithSpaceBeforeSecondTest()
        {
            inlineHelper = new WaitingInlineElementsHelper(null, capitalizeStyle);
            inlineHelper.Add(new Text("one"));
            inlineHelper.Add(new Text(" two"));
            Div div = new Div();

            inlineHelper.FlushHangingLeaves(div);
            String lineResult = GetLine(div);

            NUnit.Framework.Assert.AreEqual("One Two", lineResult);
        }
示例#4
0
        public virtual void CapitalizeTest09()
        {
            inlineHelper = new WaitingInlineElementsHelper(null, null);
            inlineHelper.Add(CreateText("one ", false));
            inlineHelper.Add(CreateText("two", true));
            Div div = new Div();

            inlineHelper.FlushHangingLeaves(div);
            String lineResult = GetLine(div);

            NUnit.Framework.Assert.AreEqual("one Two", lineResult);
        }
示例#5
0
        public virtual void CapitalizeTest05()
        {
            inlineHelper = new WaitingInlineElementsHelper(null, capitalizeStyle);
            inlineHelper.Add(new Text("one two"));
            inlineHelper.Add(new Text("three four"));
            Div div = new Div();

            inlineHelper.FlushHangingLeaves(div);
            String lineResult = GetLine(div);

            NUnit.Framework.Assert.AreEqual("One Twothree Four", lineResult);
        }
示例#6
0
        public virtual void CapitalizeTest14()
        {
            //TODO: replace assertNotEquals with assertEquals DEVSIX-4414
            inlineHelper = new WaitingInlineElementsHelper(null, null);
            inlineHelper.Add(CreateText("one'", true));
            inlineHelper.Add(CreateText("two'", true));
            Div div = new Div();

            inlineHelper.FlushHangingLeaves(div);
            String lineResult = GetLine(div);

            NUnit.Framework.Assert.AreNotEqual("One'two'", lineResult);
        }
示例#7
0
        public virtual void CapitalizeWithLineSeparatorBetweenLeavesTest()
        {
            inlineHelper = new WaitingInlineElementsHelper(null, null);
            inlineHelper.Add(CreateText("one", true));
            inlineHelper.Add(new LineSeparator(new SolidLine()));
            inlineHelper.Add(CreateText("two", true));
            Div div = new Div();

            inlineHelper.FlushHangingLeaves(div);
            String lineResult = GetLine(div);

            NUnit.Framework.Assert.AreEqual("OneTwo", lineResult);
        }
示例#8
0
        public virtual void CapitalizeTest16()
        {
            inlineHelper = new WaitingInlineElementsHelper(null, null);
            inlineHelper.Add(CreateText("(!one", true));
            inlineHelper.Add(CreateText("!two) ", true));
            inlineHelper.Add(CreateText("( one:", true));
            inlineHelper.Add(CreateText(":two) ", true));
            inlineHelper.Add(CreateText("( one:", true));
            inlineHelper.Add(CreateText("-two)", true));
            Div div = new Div();

            inlineHelper.FlushHangingLeaves(div);
            String lineResult = GetLine(div);

            NUnit.Framework.Assert.AreEqual("(!One!Two) ( One::Two) ( One:-Two)", lineResult);
        }