예제 #1
0
 public void TestIsSerializable()
 {
     // Ensure that the object is serializable.
     Input obj = new Input();
     Assert.That(obj, Is.BinarySerializable);
     Assert.That(obj, Is.XmlSerializable);
 }
예제 #2
0
        public void TestRenderingOrder()
        {
            // The rendering should be
            // dependent on the order that
            // items are set on the control.
            Input input = new Input();
            input.Type = InputType.Text;
            input.TabIndex = 10;
            input.Value = "default";

            MockHtmlWriter writer = MockHtmlWriter.GetInstance();
            input.Render(writer);
            string actualHtml = writer.ToString();
            string expectedHtml = "<input type=\"text\" tabindex=\"10\" value=\"default\" />";
            Assert.AreEqual(expectedHtml, actualHtml);
        }