예제 #1
0
 public void SetupEnumTests()
 {
     /* by calling GetText first, the hashtable is populated for the
      * tests */
     EnumTest myEnum = EnumTest.EnumTypeWithTextAttribute;
     string   myText = EnumTextAttribute.GetText(myEnum);
 }
예제 #2
0
        public void GetEnumText()
        {
            EnumTest myEnum = EnumTest.EnumTypeWithTextAttribute;
            string   myText = EnumTextAttribute.GetText(myEnum);

            Assert.AreEqual("Testing Enum Text Attributes", myText);

            myEnum = EnumTest.EnumTypeWithNoTextAttribute;
            myText = EnumTextAttribute.GetText(myEnum);
            Assert.IsNull(myText);
        }