コード例 #1
0
ファイル: InputTest.cs プロジェクト: dev360/FormFrontier
 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
ファイル: InputTest.cs プロジェクト: dev360/FormFrontier
        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);
        }