public void Student_Last_Name_Search_Capitalization_Test()
        {
            StudentController controller = new StudentController(studentsMock.Object);

            var students = controller.LastNameSearch("lei");

            Assert.AreEqual(2, students.Count);
        }
        public void Student_Last_Name_WildCard_In_Front_Search_Test()
        {
            StudentController controller = new StudentController(studentsMock.Object);

            var students = controller.LastNameSearch("art");

            Assert.AreEqual(2, students.Count);
        }
        public void Student_Index_Returns_All_Test()
        {
            StudentController controller = new StudentController(studentsMock.Object);

            var students = (List<Student>)controller.Index().Model;

            Assert.AreEqual(4, students.Count);
        }
        public void Student_ID_Wildcard_In_Front_Search_Test()
        {
            StudentController controller = new StudentController(studentsMock.Object);

            var students = controller.IdSearch("6204");

            Assert.AreEqual(1, students.Count);
        }
        public void Create_Student_Failed_No_Last_Name_Test()
        {
            StudentController controller = new StudentController(studentsMock.Object);
            Student student = new Student();

            student.FirstName = "Dave";
            student.LastName = "";

            var results = new List<ValidationResult>();
            var validationContext = new ValidationContext(student, null, null);
            Validator.TryValidateObject(student, validationContext, results, true);
            if (student is IValidatableObject) (student as IValidatableObject).Validate(validationContext);

            Assert.AreEqual("Last name is required.", results[0].ErrorMessage);
        }
        public void Create_Student_Successfully_Test()
        {
            StudentController controller = new StudentController(studentsMock.Object);

            Student newStudent = controller.Create("Dave", "Winner");

            Assert.AreEqual("Dave", newStudent.FirstName);
            Assert.AreEqual("Winner", newStudent.LastName);
        }
        public void Is_Student_Currently_Enrolled_In_School_Test()
        {
            StudentController controller = new StudentController(studentsMock.Object);

            var students = controller.IsEnrolled("1930586204");
        }