示例#1
0
        public void TestTextBox()
        {
            TextBox box = new TextBox("newBox");

            Assert.AreEqual("newBox", box.Name);
            Assert.AreEqual(String.Empty, box.Text);
            Assert.IsTrue(box is Component);

            TextBox anotherBox = new TextBox("anotherBox", "someText");
            Assert.AreEqual("someText", anotherBox.Text);
            Assert.AreEqual("anotherBox", anotherBox.Name);

            Assert.AreEqual("textBox", anotherBox.Type);
            Assert.AreEqual("textBox(\"anotherBox\")", anotherBox.GetBaseComponentString());
            Assert.AreEqual("getTestFixture().textBox(\"anotherBox\")", anotherBox.GetQueryString());
            Assert.AreEqual("getTestFixture().prefix(\"prefix\").textBox(\"anotherBox\")", anotherBox.GetQueryString("prefix(\"prefix\")"));
        }