コード例 #1
0
        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);
        }
コード例 #2
0
 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;
 }
コード例 #3
0
 public void GetStudentNameByNum()
 {
     var app = new StudentAppl();
     var name = app.GetNameByNum("123");
     Assert.AreEqual("没有该学生", name);
 }