/// <summary> /// Add drop-down list inspectors by dropDownListInspectorTypeFlag. /// </summary> public void AddDropDownListInspectors(int dropDownListInspectorTypeFlag, int selectedIndex) { if (!InputInspectorTypeHelper.IsInRangeOfDropDownListInspectorTypes(dropDownListInspectorTypeFlag)) { throw new ArgumentOutOfRangeException(ERROR_DROP_DOWN_LIST_INSPECTOR_TYPE_FLAG_IS_OUT_OF_RANGE); } if (InputInspectorTypeHelper.IsContainingDropDownListIsSelectedFlag(dropDownListInspectorTypeFlag)) { _inspectors.Add(new DropDownListIsSelectedInspector(selectedIndex)); } }
public void TestIsInRangeOfDropDownListInspectorTypes() { Assert.IsFalse(InputInspectorTypeHelper.IsInRangeOfDropDownListInspectorTypes(7)); Assert.IsTrue(InputInspectorTypeHelper.IsInRangeOfDropDownListInspectorTypes(8)); Assert.IsFalse(InputInspectorTypeHelper.IsInRangeOfDropDownListInspectorTypes(9)); }