Пример #1
0
        public void AsDictionary_OtherKeyStructureWithFalseType_ThrowsException()
        {
            // arrange
            Action fail = () => EnumHelper <TestEnum> .AsDictionary <long>();

            // act + assert
            fail.Should().Throw <ArgumentException>();
        }
Пример #2
0
        public void AsDictionary_DefaultStructure_ReturnsExpectedStructure()
        {
            // act
            var result = EnumHelper <TestEnum> .AsDictionary();

            // assert
            result.Should().HaveCount(3);
            result.Should().Contain(0, "A");
            result.Should().Contain(1, "B");
            result.Should().Contain(2, "C");
        }