Exemple #1
0
        public void TestCreateCalendarDoctor()
        {
            int         id       = 3;
            SqlCalendar sql      = new SqlCalendar();
            int         expected = sql.ListOfCalendarDoctor(id).Count + 1;

            sql.CreateCalendarDoctor(1, 3);
            int actual = sql.ListOfCalendarDoctor(id).Count;

            IEnumerable <ClassCalendarDoctor> query =
                from elem in sql.ListOfCalendarDoctor(id)
                where elem.Doctor.Doctor_id == 1 && elem.Status.StatusId == 6
                select elem;

            Assert.Single(query);
        }
Exemple #2
0
        public void TestListOfCalendarDoctor(int calendarDoctorId, int calendarId, int doctorId, int statusId)
        {
            SqlCalendar sql = new SqlCalendar();

            IEnumerable <ClassCalendarDoctor> query =
                from elem in sql.ListOfCalendarDoctor(calendarId)
                where elem.CalendarDoctorId == calendarDoctorId && elem.Doctor.Doctor_id == doctorId && elem.Status.StatusId == statusId
                select elem;

            Assert.Single(query);
        }