Example #1
0
        public void TestToggleButton()
        {
            ToggleButton button = new ToggleButton("newButton");

            Assert.AreEqual("newButton", button.Name);
            Assert.AreEqual(String.Empty, button.Text);
            Assert.IsTrue(button is Component);

            ToggleButton anotherButton = new ToggleButton("anotherButton", "someText");
            Assert.AreEqual("someText", anotherButton.Text);
            Assert.AreEqual("anotherButton", anotherButton.Name);

            Assert.AreEqual("toggleButton", anotherButton.Type);
            Assert.AreEqual("toggleButton(\"anotherButton\")", anotherButton.GetBaseComponentString());
            Assert.AreEqual("getTestFixture().toggleButton(\"anotherButton\")", anotherButton.GetQueryString());
            Assert.AreEqual("getTestFixture().prefix(\"prefix\").toggleButton(\"anotherButton\")", anotherButton.GetQueryString("prefix(\"prefix\")"));
        }