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()); }
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"); } }
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>()) ; }
public virtual void AttributesStubGetAttributeTest() { CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after"); NUnit.Framework.Assert.IsNull(pseudoElementNode.GetAttributes().GetAttribute("after")); }
public virtual void AttributesStubGetSizeTest() { CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after"); NUnit.Framework.Assert.AreEqual(0, pseudoElementNode.GetAttributes().Size()); }