コード例 #1
0
        public void BindingGroup_EnumProperty()
        {
            var writer = new StringWriter();
            var html   = new HtmlWriter(writer, CreateContext(new object()));

            html.AddKnockoutDataBind("tt", new KnockoutBindingGroup()
            {
                { "test", new TextBox()
                  {
                      Type = TextBoxType.Date
                  }, TextBox.TypeProperty }
            });
            html.RenderSelfClosingTag("span");
            Assert.AreEqual("<spandata-bind=\"tt:{&#39;test&#39;:&quot;Date&quot;}\"/>", writer.ToString().Replace(" ", ""));
        }