Esempio n. 1
0
        public void GetAvailableAppointmentByPriorityTimeIntervalSuccess()
        {
            AppointmentService       appService    = new AppointmentService(CreateStubRepositoryAppointment(), CreateStubRepositoryDoctor(), CreateRoomGateway(), null);
            AppointmentFilterService filterService = new AppointmentFilterService(appService, CreateStubRepositoryDoctor(), CreateRoomGateway());
            DateTime start_date      = new DateTime(2020, 12, 6, 8, 0, 0);
            DateTime end_date        = new DateTime(2020, 12, 6, 15, 0, 0);
            var      gotAppointments = filterService.GetAvailableByPriorityTimeInterval(new PriorityParameters {
                ChosenStartDate = start_date, ChosenEndDate = end_date
            });

            gotAppointments.ShouldNotBeEmpty();
        }
        public void FindAppointmentsForReschedulingSuccess()
        {
            AppointmentService       appointmentService = new AppointmentService(CreateStubRepositoryAppointment(), CreateStubRepositoryDoctor(), CreateRoomGateway(), null);
            AppointmentFilterService service            = new AppointmentFilterService(appointmentService, CreateStubRepositoryDoctor(), CreateStupRepositoryEquipment());
            String   id             = "2406978890047";
            DateTime start_date     = new DateTime(2020, 12, 5, 7, 30, 0);
            DateTime end_date       = new DateTime(2020, 12, 5, 15, 0, 0);
            var      gotAppointment = service.FindAppointmentsForRescheduling(new PriorityParameters {
                DoctorId = id, ChosenStartDate = start_date, ChosenEndDate = end_date
            }, -1);

            gotAppointment.Item1.ShouldNotBeEmpty();
        }
        public void FindAppointmentsForReschedulingFail()
        {
            AppointmentService       appointmentService = new AppointmentService(CreateStubRepositoryAppointment(), CreateStubRepositoryDoctor(), CreateRoomGateway(), null);
            AppointmentFilterService service            = new AppointmentFilterService(appointmentService, CreateStubRepositoryDoctor(), CreateStupRepositoryEquipment());
            String   id             = "2406978890047";
            DateTime start_date     = new DateTime(2019, 12, 7, 8, 0, 0);
            DateTime end_date       = new DateTime(2019, 12, 7, 15, 0, 0);
            var      gotAppointment = service.FindAppointmentsForRescheduling(new PriorityParameters {
                DoctorId = id, ChosenStartDate = start_date, ChosenEndDate = end_date, SpecializationId = 1
            }, -1);

            gotAppointment.Item1.IsNullOrEmpty();
        }
        public void FindEmergencyAppointmentSuccess()
        {
            AppointmentService       appointmentService = new AppointmentService(CreateStubRepositoryAppointment(), CreateStubRepositoryDoctor(), CreateRoomGateway(), null);
            AppointmentFilterService service            = new AppointmentFilterService(appointmentService, CreateStubRepositoryDoctor(), CreateStupRepositoryEquipment());
            String   id             = "2406978890047";
            DateTime start_date     = new DateTime(2020, 12, 7, 8, 0, 0);
            DateTime end_date       = new DateTime(2020, 12, 7, 15, 0, 0);
            var      gotAppointment = service.FindEmergencyAppointment(new PriorityParameters {
                DoctorId = id, ChosenStartDate = start_date, ChosenEndDate = end_date, SpecializationId = 1
            }, -1);

            gotAppointment.ShouldNotBeEmpty();
        }
        public void FindEmergencyAppointmentFail()
        {
            AppointmentService       appointmentService = new AppointmentService(CreateStubRepositoryAppointment(), CreateStubRepositoryDoctor(), CreateRoomGateway(), null);
            AppointmentFilterService service            = new AppointmentFilterService(appointmentService, CreateStubRepositoryDoctor(), CreateStupRepositoryEquipment());
            String   id             = "2406978890047";
            DateTime start_date     = new DateTime(1999, 12, 5, 8, 0, 0);
            DateTime end_date       = new DateTime(1999, 12, 5, 8, 30, 0);
            var      gotAppointment = service.FindEmergencyAppointment(new PriorityParameters {
                DoctorId = id, ChosenStartDate = start_date, ChosenEndDate = end_date
            }, 9);

            gotAppointment.IsNullOrEmpty();
        }
Esempio n. 6
0
        public void GetAvailableAppointmentsForDoctorAndTimeFail()
        {
            AppointmentService       appService    = new AppointmentService(CreateStubRepositoryAppointment(), CreateStubRepositoryDoctor(), CreateRoomGateway(), null);
            AppointmentFilterService filterService = new AppointmentFilterService(appService, CreateStubRepositoryDoctor(), CreateRoomGateway());
            String   id             = "2406978890047";
            DateTime start_date     = new DateTime(1999, 12, 5, 8, 0, 0);
            DateTime end_date       = new DateTime(1999, 12, 5, 8, 30, 0);
            var      gotAppointment = appService.GetAvailableByDoctorAndTimeInterval(new PriorityParameters {
                DoctorId = id, ChosenStartDate = start_date, ChosenEndDate = end_date
            });

            gotAppointment.IsNullOrEmpty();
        }
Esempio n. 7
0
        public void GetAvailableAppointmentByPriorityEquipmentFail()
        {
            AppointmentService       appService    = new AppointmentService(CreateStubRepositoryAppointment(), CreateStubRepositoryDoctor(), CreateRoomGateway(), null);
            AppointmentFilterService filterService = new AppointmentFilterService(appService, CreateStubRepositoryDoctor(), CreateRoomGateway());
            String   id              = "2406978890047";
            DateTime start_date      = new DateTime(2020, 12, 10, 8, 0, 0);
            DateTime end_date        = new DateTime(2020, 12, 10, 8, 30, 0);
            var      gotAppointments = filterService.GetAvailableByDoctorTimeIntervalAndEquipment(new PriorityParameters {
                DoctorId = id, ChosenStartDate = start_date, ChosenEndDate = end_date
            }, 1, "doctor");

            gotAppointments.IsNullOrEmpty();
        }