private static List<SelectListItem> GetAreaTypeItems(PleaseSelectOption pleaseSelectOption, int selectedAreaTypeId, IList<AreaType> areaTypes) { var items = new AreaTypeSelectListBuilder(areaTypes, selectedAreaTypeId).SelectListItems; if (pleaseSelectOption == PleaseSelectOption.Required) { AddPleaseSelectOption(items); } return items; }
private static void AssignAreaTypeData(IndicatorGridModel model, Profile profile) { var builder = new AreaTypeSelectListBuilder(profile.AreaTypes, profile.SelectedAreaType); model.SelectedAreaTypeId = builder.SelectedAreaTypeId; model.AreaTypeList = builder.SelectListItems; }
private static void AssertAreaTypesAreUndefined(AreaTypeSelectListBuilder builder) { Assert.AreEqual(builder.SelectedAreaTypeId, AreaTypeSelectListBuilder.UndefinedAreaTypeId); Assert.IsNull(builder.SelectListItems); }