public void testname()
        {
            //arrange
            HtmlExtensions.Render = (a, b) => "";

            var helper = InputModelPropertyFactoryTester.CreateHelper(new Model());
            //act

            var result = helper.InputButtons();

            //assert
            Assert.IsEmpty(result);
        }
        public void Input_should_build_a_InputTypeSpecification()
        {
            Model model = new Model()
            {
                StringProp = "foo"
            };
            var input = new Input <Model>(InputModelPropertyFactoryTester.CreateHelper(model));

            //act
            var result = input.RenderForm("foo", "bar");

            //assert
            Assert.IsInstanceOf <InputTypeSpecification <Model> >(result);
        }
        public void The_input_should_a_property_specification()
        {
            //arrange
            Model model = new Model()
            {
                StringProp = "foo"
            };
            var input = new Input <Model>(InputModelPropertyFactoryTester.CreateHelper(model));

            //act
            var result = input.RenderInput(m => m.StringProp);

            //assert
            Assert.IsInstanceOf <InputPropertySpecification>(result);
            Assert.IsNotNull(result.Model);
        }
        public void Model_is_invalid_should_return_true()
        {
            Model m = new Model()
            {
                String = "foo"
            };
            var pi = m.GetType().GetProperty("String");
            //arrange
            var helper = InputModelPropertyFactoryTester.CreateHelper(m);

            helper.ViewData.ModelState.AddModelError("String", "foo bar");
            //act
            var result = _conventions.ModelIsInvalidConvention(pi, helper);

            //assert
            Assert.IsTrue(result);
        }