Exemplo n.º 1
0
        public virtual void GetAttributesTest()
        {
            CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after");

            NUnit.Framework.Assert.IsTrue(pseudoElementNode.GetAttributes() is IAttributes);
            NUnit.Framework.Assert.IsFalse(pseudoElementNode.GetAttributes() == pseudoElementNode.GetAttributes());
        }
Exemplo n.º 2
0
        public virtual void AttributesStubIteratorTest()
        {
            CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after");

            foreach (IAttribute attr in pseudoElementNode.GetAttributes())
            {
                NUnit.Framework.Assert.Fail("AttributesStub must return an empty iterator");
            }
        }
Exemplo n.º 3
0
 public virtual void AttributesStubSetAttributeTest()
 {
     NUnit.Framework.Assert.That(() => {
         CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after");
         pseudoElementNode.GetAttributes().SetAttribute("content", "iText");
         NUnit.Framework.Assert.Fail();
     }
                                 , NUnit.Framework.Throws.InstanceOf <NotSupportedException>())
     ;
 }
Exemplo n.º 4
0
        public virtual void AttributesStubGetAttributeTest()
        {
            CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after");

            NUnit.Framework.Assert.IsNull(pseudoElementNode.GetAttributes().GetAttribute("after"));
        }
Exemplo n.º 5
0
        public virtual void AttributesStubGetSizeTest()
        {
            CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after");

            NUnit.Framework.Assert.AreEqual(0, pseudoElementNode.GetAttributes().Size());
        }