public void ConvertStringToEnumByDescription_of_Nonexisting_Enum_with_Description_Returns_FirstEnum()
        {
            EnumWithDescription expectedEnum = 0;
            EnumWithDescription testEnum     = EnumLibrary.ConvertStringToEnumByDescription <EnumWithDescription>("nonexistentEnum");

            Assert.AreEqual(expectedEnum, testEnum);
        }
        [TestCase(3, ExpectedResult = enumListDescriptionExpected)] // Choosing enum outside of range
        public string GetEnumDescriptionList_of_Enum_with_Descriptions_Returns_Matching_List(EnumWithDescription anyEnum)
        {
            List <string> enumList      = EnumLibrary.GetEnumDescriptionList(anyEnum);
            string        resultingList = "";
            int           i             = 0;

            foreach (string enumName in enumList)
            {
                resultingList += enumName;
                if (i < enumList.Count - 1)
                {
                    resultingList += ", ";
                }
                i++;
            }
            return(resultingList);
        }
 [TestCase(3, ExpectedResult = "")] // Using Enum outside of range
 public string GetEnumDescription_of_Enum_with_Description_Returns_Matching_Description(EnumWithDescription enumToCheck)
 {
     return(EnumLibrary.GetEnumDescription(enumToCheck));
 }
 public ServicePropertiesForm()
 {
     InitializeComponent();
     cbStartupType.Items.AddRange(EnumWithDescription <ServiceStartMode> .GetEnumValuesArray());
 }