コード例 #1
0
ファイル: ViewModel.cs プロジェクト: ryanjmurry/aha
 public ViewModel()
 {
     AllTutors       = Tutor.GetAll();
     AllClients      = Client.GetAll();
     AllAppointments = Appointment.GetAll();
     AllSpecialties  = Specialty.GetAll();
 }
コード例 #2
0
        public void DeleteAll_DeletesAllTutorsFromDb_TutorList()
        {
            Tutor newTutor = new Tutor("Sean", "Miller", "*****@*****.**", "1234567890", 1, true, "Weekends", 25.00);

            newTutor.Save();
            Tutor.DeleteAll();
            List <Tutor> expectedList = new List <Tutor> {
            };
            List <Tutor> actualList   = Tutor.GetAll();

            CollectionAssert.AreEqual(expectedList, actualList);
        }
コード例 #3
0
        public void Delete_DeletesTutorInDb_TutorList()
        {
            Tutor newTutor1 = new Tutor("Sean", "Miller", "*****@*****.**", "1234567890", 1, true, "Weekends", 25.00);

            newTutor1.Save();
            Tutor newTutor2 = new Tutor("Sean", "Miller", "*****@*****.**", "1234567890", 1, true, "Weekends", 25.00);

            newTutor2.Save();
            Tutor.Delete(newTutor1.Id);
            List <Tutor> expectedList = new List <Tutor> {
                newTutor2
            };
            List <Tutor> actualList = Tutor.GetAll();

            CollectionAssert.AreEqual(expectedList, actualList);
        }
コード例 #4
0
        public void GetAll_ChecksDbStartsEmpty_0()
        {
            int result = Tutor.GetAll().Count;

            Assert.AreEqual(0, result);
        }
コード例 #5
0
ファイル: HomeController.cs プロジェクト: ryanjmurry/aha
        public ActionResult Tutors()
        {
            List <Tutor> allTutors = Tutor.GetAll();

            return(View(allTutors));
        }