示例#1
0
        public void GetAll()
        {
            var list = EnumTest.GetAll().ToList();

            var expect = new List <EnumTest>
            {
                EnumTest.A,
                EnumTest.B
            };

            expect.ToExpectedObject().ShouldEqual(list);
        }
示例#2
0
        public void FromDisplayName_Error()
        {
            var e = EnumTest.FromDisplayName("C");

            e.Should().BeNull();
        }
示例#3
0
        public void FromDisplayName_not_case()
        {
            var e = EnumTest.FromDisplayName("a");

            EnumTest.A.ToExpectedObject().ShouldEqual(e);
        }
示例#4
0
        public void FromValue_Error()
        {
            var e = EnumTest.FromValue(3);

            e.Should().BeNull();
        }
示例#5
0
        public void FromValue()
        {
            var e = EnumTest.FromValue(1);

            EnumTest.A.ToExpectedObject().ShouldEqual(e);
        }