public void Add_appointment()
        {
            AppointmentDto myAppointment = CreateAppointment();

            HospitalApp.Controllers.AppointmentController controller = new HospitalApp.Controllers.AppointmentController(this.SetupRepository(myAppointment, null).Object);

            var actionResult = controller.Add(myAppointment);

            ConvertToObject(actionResult).ShouldBeEquivalentTo(myAppointment);
        }
        public void Get_all_appointments()
        {
            List <AppointmentDto> appointments = CreateAppointments();

            HospitalApp.Controllers.AppointmentController controller = new HospitalApp.Controllers.AppointmentController(this.SetupRepository(null, null).Object);

            var actionResult = controller.GetAll();

            ConvertToList(actionResult).ShouldBeEquivalentTo(appointments);
        }
        public void Finish_appointment()
        {
            AppointmentDto myAppointment = CreateAppointments().Find(a => a.Id == 1);

            myAppointment.Status = AppointmentStatus.Done;
            HospitalApp.Controllers.AppointmentController controller = new HospitalApp.Controllers.AppointmentController(this.SetupRepository(myAppointment, null).Object);

            var actionResult = controller.FinishAppointment(myAppointment.Id);

            actionResult.ShouldBeOfType(typeof(OkResult));
        }