Beispiel #1
0
        public void GetAppointmentsQueryBySummary_ShouldReturnDefaultAppointmentsQuery_WhenSearchStringNull()
        {
            //Arrange
            string searchString = null;

            // Act
            var appointmentsQuery = AppointmentsBusinessLogic.GetAppointmentsQueryBySummary(searchString);

            // Assert
            Assert.Null(appointmentsQuery);
        }
        public AppointmentsController(IAppointmentRepository <Appointment> appointmentRepository)
        {
            _appointmentRepository = appointmentRepository;
            // LINQ to get all Locations in Appointments table
            _appointmentLocationQuery = from m in appointmentRepository.GetContext().Appointments
                                        orderby m.Location
                                        select m.Location;

            // Create new instance of business logic and supply context arg
            _appointmentsBusinessLogic = new AppointmentsBusinessLogic(appointmentRepository.GetContext());
        }