public void __Process() { switch (WHICH_ENUM) { case MyEnumeration.first: RETURN_ENUM = MyEnumeration.first; break; case MyEnumeration.second: RETURN_ENUM = MyEnumeration.second; break; case MyEnumeration.third: RETURN_ENUM = MyEnumeration.third; break; case MyEnumeration.forth: RETURN_ENUM = MyEnumeration.forth; break; default: RETURN_ENUM = MyEnumeration.defaultvalue; break; } }
public void TestLocalizationByConvention() { MyEnumeration enumeration = MyEnumeration.Value1; string localized = LocalizedEnumConverter.ConvertValueToString(enumeration); Assert.AreEqual(Resources.MyEnumeration.Value1, localized); }