Exemplo n.º 1
0
        public void ToString_WhenCalled_ReturnsStringInParsableForm()
        {
            var e = new HtmlPathElement("Tr", 3);

            Assert.That(e.ToString(), Is.EqualTo("TR[3]"));

            var clone = HtmlPathElement.Parse(e.ToString());

            Assert.That(clone.TagName, Is.EqualTo("TR"));
            Assert.That(clone.Position, Is.EqualTo(3));
        }
Exemplo n.º 2
0
        public void SimpleElement()
        {
            HtmlPathElement e = new HtmlPathElement("Tr", 3);

            Assert.AreEqual("TR", e.TagName);
            Assert.AreEqual(3, e.Position);
            Assert.IsFalse(e.IsTableOrTBody);
            Assert.AreEqual("TR[3]", e.ToString());
        }