Ejemplo n.º 1
0
        public void TestTree()
        {
            Tree tree = new Tree("newTree");

            Assert.AreEqual("newTree", tree.Name);
            Assert.AreEqual(String.Empty, tree.Text);
            Assert.IsTrue(tree is Component);

            Tree anotherTree = new Tree("anotherTree", "someText");
            Assert.AreEqual("someText", anotherTree.Text);
            Assert.AreEqual("anotherTree", anotherTree.Name);

            Assert.AreEqual("tree", anotherTree.Type);
            Assert.AreEqual("tree(\"anotherTree\")", anotherTree.GetBaseComponentString());
            Assert.AreEqual("getTestFixture().tree(\"anotherTree\")", anotherTree.GetQueryString());
            Assert.AreEqual("getTestFixture().prefix(\"prefix\").tree(\"anotherTree\")", anotherTree.GetQueryString("prefix(\"prefix\")"));
        }