Beispiel #1
0
 public async Task <IActionResult> GetMenuBtnTypes()
 {
     return(await Task.Run(() =>
     {
         var result = EnumsHelper.GetEnumDictionary <MenusTypeEnum.MenuBtnTypeEnum>();
         return Success(result);
     }));
 }
 public void Given_WrongEnumType_When_GetEnumDictionaryInvoked_Then_ExceptionThrown()
 {
     Assert.ThrowsException <ArgumentException>(() => EnumsHelper.GetEnumDictionary <DateTime>());
 }
        public void Given_KnownEnumType_When_GetEnumDictionaryInvoked_Then_EnumListRetrived()
        {
            var enumList = EnumsHelper.GetEnumDictionary <TestEnum>();

            Assert.AreEqual(enumList.Count, 3);
        }