public DataTable GetStudentByStudentCode() { var studentCode = Convert.ToString(Session["StudentCode"]); var data = studentService.ShowStudentByStudentCode(studentCode); return(data); }
public void ShowStudentByStudentCode_WhenCalled_VerifyTheRightCommandBeingCalled() { var command = String.Format("Select FirstName, LastName,Description,GPA from Student where StudentCode = '{0}'", studentCode); _studentService.ShowStudentByStudentCode(studentCode); _myDbAccess.Verify(db => db.Select(command, _connectionString), Times.Once); }