Пример #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());
        }
Пример #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");
            }
        }
Пример #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>())
     ;
 }
Пример #4
0
        public virtual void AttributesStubGetAttributeTest()
        {
            CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after");

            NUnit.Framework.Assert.IsNull(pseudoElementNode.GetAttributes().GetAttribute("after"));
        }
Пример #5
0
        public virtual void AttributesStubGetSizeTest()
        {
            CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after");

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