示例#1
0
        public void TestDialog()
        {
            Dialog dialog = new Dialog("newDialog");

            Assert.AreEqual("newDialog", dialog.Name);
            Assert.AreEqual(String.Empty, dialog.Text);
            Assert.IsTrue(dialog is Component);

            Dialog anotherDialog = new Dialog("anotherDialog", "someText");
            Assert.AreEqual("someText", anotherDialog.Text);
            Assert.AreEqual("anotherDialog", anotherDialog.Name);

            Assert.AreEqual("dialog", anotherDialog.Type);
            Assert.AreEqual("dialog(\"anotherDialog\")", anotherDialog.GetBaseComponentString());
            Assert.AreEqual("getTestFixture().dialog(\"anotherDialog\")", anotherDialog.GetQueryString());
            Assert.AreEqual("getTestFixture().prefix(\"prefix\").dialog(\"anotherDialog\")", anotherDialog.GetQueryString("prefix(\"prefix\")"));
        }