public ResponseView GetStudentNameByStudentNum(string studentNum) { var name = new StudentAppl().GetNameByNum(studentNum); var result = new ResponseView(); if (name.Contains("没有该学生")) { result.IsSuccess = false; } result.Message = name; return(result); }
public ResponseView GetStudentNameByStudentNum(string studentNum) { var name = new StudentAppl().GetNameByNum(studentNum); var result = new ResponseView(); if (name.Contains("没有该学生")) { result.IsSuccess = false; } result.Message = name; return result; }
public void GetStudentNameByNum() { var app = new StudentAppl(); var name = app.GetNameByNum("123"); Assert.AreEqual("没有该学生", name); }