public void CanRenderAPropertyWithoutThrowingAnException()
 {
     var someObject = new SomeType() {SomeProperty = "SomeValue"};
     var properties = Properties.For(someObject);
     var annotation = new System.ComponentModel.DataAnnotations.DisplayAttribute();
     var helper = new RazorTemplateHtmlHelper();
     var html = properties.Render(helper);
     Assert.AreEqual(expected, html);
 }
示例#2
0
        public void CanRenderAPropertyWithoutThrowingAnException()
        {
            var someObject = new SomeType()
            {
                SomeProperty = "SomeValue"
            };
            var properties = Properties.For(someObject);
            ////var annotation = new System.ComponentModel.DataAnnotations.DisplayAttribute();
            var helper = new RazorTemplateHtmlHelper();
            var html   = properties.Render(helper);

            Assert.AreEqual(expected, html);
        }
示例#3
0
        public async Task Test()
        {
            var someObject = new SomeType()
            {
                SomeProperty = "SomeValue"
            };
            var properties = FF.PropertiesFor(someObject);

            var html       = properties.Render();
            var annotation = new FormFactory.Attributes.DisplayAttribute();
            var actualCq   = CQ.CreateFragment(html.ToString());
            var input      = actualCq.Find("input").Single(el => el.GetAttribute("name") == "SomeProperty");

            Assert.AreEqual("SomeValue", input.GetAttribute("value"));
        }