public void The_toString_should_call_the_render_method()
        {
            //arrange
            var spec = new InputPropertySpecification();
            var property = new PropertyViewModel();
            spec.Model = property;
            spec.Render = (a, b) =>
                              {
                                  Assert.AreEqual(property, b);
                                  return "foo";
                              };
            //act
            var result = spec.ToString();

            //assert
            Assert.AreEqual("foo",result);
        }
示例#2
0
 public static void RenderPartial(this HtmlHelper helper, PropertyViewModel model)
 {
     helper.RenderPartial((TypeViewModel)model);
 }