public void Render_Renders_Correct_Tag() { var htmlTag = new InputHtmlTag("text", getInputName); var result = htmlTag.Render(); result.ShouldContain("<input"); }
public void Name_Sets_Name_Attribute() { var htmlTag = new InputHtmlTag("text", getInputName); htmlTag.Name("uweb"); var result = htmlTag.Render(); result.ShouldContain("name=\"uweb\""); }
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)); }
public void Value_Sets_Value_Attribute() { var htmlTag = new InputHtmlTag("text", getInputName); htmlTag.Value("value"); var result = htmlTag.Render(); result.ShouldContain("value=\"value\""); }