public void Should_return_HTML_code_representing_a_DropDownList_with_its_value_embedded_in_it() { _dropDownListData = new DropDownListData(_items) .WithValidationFrom(_propertyMetaData) .WithId(_id) .WithSelectedValue("Value2"); _dropDownListData.ToString().ShouldBeEqualTo(_htmlText); }
public void Should_add_hidden_control_with_the_selected_value() { var dropDownListData = new DropDownListData(_items) .AsReadOnly() .WithId(_id); var result = dropDownListData.ToString(); result.ShouldBeEqualTo(_htmlText); }