public static string GetEducationName(EducationEnum e) { string a = ""; switch (e) { case EducationEnum.Primary: a = "小学"; break; case EducationEnum.Junior: a = "初中"; break; case EducationEnum.Senior: a = "高中"; break; case EducationEnum.Vocational: a = "高职"; break; case EducationEnum.College: a = "专科"; break; case EducationEnum.Undergraduate: a = "本科"; break; case EducationEnum.Postgraduate: a = "研究生"; break; case EducationEnum.Doctor: a = "博士"; break; case EducationEnum.Postdoctoral: a = "博士后"; break; } return a; }
public void CanGetEnumDescription(EducationEnum educationEnum, string expectedEnumDecriptionText) { Assert.That(educationEnum.GetEnumDescription(), Is.EqualTo(expectedEnumDecriptionText)); }