示例#1
0
        public void Count_PatientsFrom_OneDoctor()
        {
            Doctor testDoctor = new Doctor("Jack");

            testDoctor.Save();
            Patient newPatient1 = new Patient("Mark", new DateTime());

            newPatient1.Save();
            testDoctor.AddPatient(newPatient1);
            Patient newPatient2 = new Patient("Erik", new DateTime());

            newPatient2.Save();
            testDoctor.AddPatient(newPatient2);
            Doctor foundDoctor = Doctor.Find(testDoctor.GetId());
            int    result      = foundDoctor.CountPatients();

            Assert.AreEqual(2, result);
        }