Exemple #1
0
        public void Render_Renders_Correct_Tag()
        {
            var htmlTag = new InputHtmlTag("text", getInputName);
            var result = htmlTag.Render();

            result.ShouldContain("<input");
        }
Exemple #2
0
        public void Name_Sets_Name_Attribute()
        {
            var htmlTag = new InputHtmlTag("text", getInputName);
            htmlTag.Name("uweb");

            var result = htmlTag.Render();

            result.ShouldContain("name=\"uweb\"");
        }
Exemple #3
0
        public void For_Sets_Correct_Name()
        {
            const string name = "uweb";
            A.CallTo(() => getInputName.Get(A<Expression<Func<object, object>>>.Ignored)).Returns(name);

            var htmlTag = new InputHtmlTag("text", getInputName);
            htmlTag.For(A<Expression<Func<object, object>>>.Ignored);

            var result = htmlTag.Render();

            result.ShouldContain(string.Format("name=\"{0}\"", name));
        }
Exemple #4
0
        public void Value_Sets_Value_Attribute()
        {
            var htmlTag = new InputHtmlTag("text", getInputName);
            htmlTag.Value("value");

            var result = htmlTag.Render();

            result.ShouldContain("value=\"value\"");
        }