示例#1
0
        public void TestFileChooser()
        {
            FileChooser chooser = new FileChooser("newChooser");

            Assert.AreEqual("newChooser", chooser.Name);
            Assert.AreEqual(String.Empty, chooser.Text);
            Assert.IsTrue(chooser is Component);

            FileChooser anotherChooser = new FileChooser("anotherChooser", "someText");
            Assert.AreEqual("someText", anotherChooser.Text);
            Assert.AreEqual("anotherChooser", anotherChooser.Name);

            Assert.AreEqual("fileChooser", anotherChooser.Type);
            Assert.AreEqual("fileChooser(\"anotherChooser\")", anotherChooser.GetBaseComponentString());
            Assert.AreEqual("getTestFixture().fileChooser(\"anotherChooser\")", anotherChooser.GetQueryString());
            Assert.AreEqual("getTestFixture().prefix(\"prefix\").fileChooser(\"anotherChooser\")", anotherChooser.GetQueryString("prefix(\"prefix\")"));
        }