public void SetupEnumTests() { /* by calling GetText first, the hashtable is populated for the * tests */ EnumTest myEnum = EnumTest.EnumTypeWithTextAttribute; string myText = EnumTextAttribute.GetText(myEnum); }
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); }