public Student(string name, string gender, string studentType) { Name = name; StudentType = (StudentType)Enum.Parse(typeof(StudentType), studentType, true); Gender = ConvertHelpers.ConvertToGender(gender); LastUpdate = DateTime.Now; }
public void ReturnGenderFromFullString() { string gender = "Female"; Gender female = ConvertHelpers.ConvertToGender(gender); Assert.AreEqual(female, Gender.Female); }
public Student(string cvsLine) { var values = cvsLine.Split(','); StudentType = (StudentType)Enum.Parse(typeof(StudentType), values[0], true); Name = values[1]; LastUpdate = ConvertHelpers.ConvertToDate(values[3]); Gender = ConvertHelpers.ConvertToGender(values[2]); }