private void Fill_cmbRuleType_Rules() { var retMessage = new string[4]; try { foreach (var bRuleType in BRuleType.GetAll()) { var newComboBoxConcept = new ComboBoxItem((GetLocalResourceObject(bRuleType.Name)).ToString()) { Value = (bRuleType.ID).ToString() }; cmbRuleType_Rules.Items.Add(newComboBoxConcept); } } catch (UIValidationExceptions ex) { retMessage = this.ExceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage); this.ErrorHiddenField_TypeFields.Value = this.ExceptionHandler.CreateErrorMessage(retMessage); } catch (UIBaseException ex) { retMessage = this.ExceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage); this.ErrorHiddenField_TypeFields.Value = this.ExceptionHandler.CreateErrorMessage(retMessage); } catch (Exception ex) { retMessage = this.ExceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage); this.ErrorHiddenField_TypeFields.Value = this.ExceptionHandler.CreateErrorMessage(retMessage); } }
public void GetAllRuleTypeTest() { IList <RuleType> RuleTypes = businessRuleType.GetAll(); Assert.AreEqual(RuleTypes.Count, ruleTypeTA.GetCount()); }