Пример #1
0
        public void ConvertEnumToArray <T>(
            T dummyForT,
            int expectedCount,
            DropDownFirstItemType dropDownFirstItemType,
            bool useDescriptionAttribute,
            bool includeDefault,
            SortDirectionType sortDirectionType,
            bool byFlagIncludeBase,
            bool byFlagIncludeCombined)
            where T : Enum
        {
            // Arrange
            var enumType = dummyForT.GetType();

            // Act
            var actual = EnumHelper.ConvertEnumToArray(
                enumType,
                dropDownFirstItemType,
                useDescriptionAttribute,
                includeDefault,
                sortDirectionType,
                byFlagIncludeBase,
                byFlagIncludeCombined);

            // Assert
            actual.Should().NotBeNull().And.HaveCount(expectedCount);
        }