public void RadioFor_Value_Int() { var model = new Model1() { PropInt = 1 }; var helper = new HtmlTagHelper <Model1>(model); var propExpression = Expr((Model1 m) => m.PropInt); var tag = helper.RadioFor(propExpression); AssertValid(tag, "input", "PropInt", type: "radio", value: model.PropInt); }
public void RadioFor_Value_Bool_Checked() { var model = new Model1() { PropBool = true }; var helper = new HtmlTagHelper <Model1>(model); var propExpression = Expr((Model1 m) => m.PropBool); var tag = helper.RadioFor(propExpression, isChecked: true); AssertValid(tag, "input", "PropBool", type: "radio", value: model.PropBool); Assert.True(tag.Checked()); }