public void CheckBoxListFor_Null() { var model = new Model1() { PropIntList = null }; var helper = new HtmlTagHelper <Model1>(model); var propExpression = Expr((Model1 m) => m.PropIntList); var tag = helper.CheckBoxListFor( propExpression, OptionsList.CreateForEnum <Enum1>()); Assert.Equal(3, tag.Children.Count()); CheckBoxListTagTest.AssertValidOption(tag.Options.Skip(0).First(), name: "PropIntList", display: "Option1", value: 1, isChecked: false); CheckBoxListTagTest.AssertValidOption(tag.Options.Skip(1).First(), name: "PropIntList", display: "Option2", value: 2, isChecked: false); CheckBoxListTagTest.AssertValidOption(tag.Options.Skip(2).First(), name: "PropIntList", display: "Option3", value: 3, isChecked: false); }