예제 #1
0
        public virtual void CreatePseudoElementTagNameTest()
        {
            String beforePseudoElemName = CssPseudoElementUtil.CreatePseudoElementTagName("before");
            String expected             = "pseudo-element::before";

            NUnit.Framework.Assert.AreEqual(expected, beforePseudoElemName);
        }
예제 #2
0
        public virtual void HasBeforeElementTest()
        {
            iText.StyledXmlParser.Jsoup.Nodes.Element element = new iText.StyledXmlParser.Jsoup.Nodes.Element(iText.StyledXmlParser.Jsoup.Parser.Tag
                                                                                                              .ValueOf("before"), "");
            IElementNode node = new JsoupElementNode(element);

            NUnit.Framework.Assert.IsTrue(CssPseudoElementUtil.HasBeforeAfterElements(node));
        }
예제 #3
0
 /// <summary>
 /// Creates a new
 /// <see cref="CssPseudoElementNode"/>
 /// instance.
 /// </summary>
 /// <param name="parentNode">the parent node</param>
 /// <param name="pseudoElementName">the pseudo element name</param>
 public CssPseudoElementNode(INode parentNode, String pseudoElementName)
     : base(parentNode)
 {
     this.pseudoElementName    = pseudoElementName;
     this.pseudoElementTagName = CssPseudoElementUtil.CreatePseudoElementTagName(pseudoElementName);
 }
예제 #4
0
 public virtual void HasBeforeAfterElementsInstanceOfTest()
 {
     NUnit.Framework.Assert.IsFalse(CssPseudoElementUtil.HasBeforeAfterElements(new CssPseudoElementNode(null,
                                                                                                         "")));
 }
예제 #5
0
 public virtual void HasBeforeAfterElementsNullScenarioTest()
 {
     NUnit.Framework.Assert.IsFalse(CssPseudoElementUtil.HasBeforeAfterElements(null));
 }