예제 #1
0
        public void TestValueFromName2()
        {
            Colours c = ExtendedEnum <Colours> .GetValue("Green | Red", true);

            Assert.AreEqual(Colours.Yellow, c);
        }
예제 #2
0
        public void TestNumericalGetValue()
        {
            Colours c = ExtendedEnum <Colours> .GetValue("32 | Red", true);

            Assert.AreEqual((Colours)32 | Colours.Red, c);
        }
예제 #3
0
        public void TestGetValueFromName()
        {
            Colours c = ExtendedEnum <Colours> .GetValue("Yellow | Blue", true);

            Assert.AreEqual(Colours.Yellow | Colours.Blue, c);
        }