Ejemplo n.º 1
0
        public void ToStringTEnum_WithAttrib_EqualsFirstName()
        {
            var name = EnumEx.ToString <TestEnum>(TestEnum.WithAttrib);

            Assert.AreEqual("WithAttrib", name);
        }
Ejemplo n.º 2
0
        public void ToStringTEnum_OutOfRange_IsNull()
        {
            var name = EnumEx.ToString <TestEnum>((TestEnum)3);

            Assert.AreEqual("3", name);
        }
Ejemplo n.º 3
0
        public void ToString_WithAttrib_EqualsFirstName()
        {
            var name = EnumEx.ToString(typeof(TestEnum), TestEnum.WithAttrib);

            Assert.AreEqual("WithAttrib", name);
        }
Ejemplo n.º 4
0
        public void ToString_OutOfRange_IsNull()
        {
            var name = EnumEx.ToString(typeof(TestEnum), (TestEnum)3);

            Assert.AreEqual("3", name);
        }