Exemple #1
0
 public virtual void Html()
 {
     iText.StyledXmlParser.Jsoup.Nodes.Attribute attr = new iText.StyledXmlParser.Jsoup.Nodes.Attribute("key",
                                                                                                        "value &");
     NUnit.Framework.Assert.AreEqual("key=\"value &\"", attr.Html());
     NUnit.Framework.Assert.AreEqual(attr.Html(), attr.ToString());
 }
Exemple #2
0
        public virtual void TestWithSupplementaryCharacterInAttributeKeyAndValue()
        {
            String s = new String(iText.IO.Util.TextUtil.ToChars(135361));

            iText.StyledXmlParser.Jsoup.Nodes.Attribute attr = new iText.StyledXmlParser.Jsoup.Nodes.Attribute(s, "A"
                                                                                                               + s + "B");
            NUnit.Framework.Assert.AreEqual(s + "=\"A" + s + "B\"", attr.Html());
            NUnit.Framework.Assert.AreEqual(attr.Html(), attr.ToString());
        }
Exemple #3
0
 public override bool Equals(Object o)
 {
     if (this == o)
     {
         return(true);
     }
     if (!(o is iText.StyledXmlParser.Jsoup.Nodes.Attribute))
     {
         return(false);
     }
     iText.StyledXmlParser.Jsoup.Nodes.Attribute attribute = (iText.StyledXmlParser.Jsoup.Nodes.Attribute)o;
     if (key != null ? !key.Equals(attribute.key) : attribute.key != null)
     {
         return(false);
     }
     return(!(value != null ? !value.Equals(attribute.value) : attribute.value != null));
 }
Exemple #4
0
 /// <summary>
 /// Creates a new
 /// <see cref="JsoupAttribute"/>
 /// instance.
 /// </summary>
 /// <param name="attribute">the attribute</param>
 public JsoupAttribute(iText.StyledXmlParser.Jsoup.Nodes.Attribute attribute)
 {
     this.attribute = attribute;
 }