public ReservationsService(GetAllReservationsQuery queryAll, GetReservationByIdQuery queryById, AddReservationQuery queryAdd, DeleteReservationQuery queryDelete, GetAllLecturersQuery queryAllLecturers, GetAllLectureHallsQuery queryAllLectureHalls) { _queryAll = queryAll; _queryById = queryById; _queryAdd = queryAdd; _queryDelete = queryDelete; _queryAllLecturers = queryAllLecturers; _queryAllLectureHalls = queryAllLectureHalls; }
private ReservationsService CreateReservationsServiceForStatisticsTests() { mockDb = TestDatabaseFactory.CreateDatabaseForStatistics(); mockQueryAllLectureHalls = new GetAllLectureHallsQuery(mockDb); mockQueryAllLectures = new GetAllLecturersQuery(mockDb); mockQueryAllReservations = new GetAllReservationsQuery(mockDb); mockQueryAddReservation = new AddReservationQuery(mockDb); mockQueryDeleteReservation = new DeleteReservationQuery(mockDb); mockQueryGetReservationById = new GetReservationByIdQuery(mockDb); return(new ReservationsService(mockQueryAllReservations, mockQueryGetReservationById, mockQueryAddReservation, mockQueryDeleteReservation, mockQueryAllLectures, mockQueryAllLectureHalls)); }
private ReservationsService CreateReservationsService(bool empty) { mockDb = empty ? TestDatabaseFactory.CreateEmptyDatabase() : TestDatabaseFactory.CreateDatabase(); mockQueryAllLectureHalls = new GetAllLectureHallsQuery(mockDb); mockQueryAllLectures = new GetAllLecturersQuery(mockDb); mockQueryAllReservations = new GetAllReservationsQuery(mockDb); mockQueryAddReservation = new AddReservationQuery(mockDb); mockQueryDeleteReservation = new DeleteReservationQuery(mockDb); mockQueryGetReservationById = new GetReservationByIdQuery(mockDb); return(new ReservationsService(mockQueryAllReservations, mockQueryGetReservationById, mockQueryAddReservation, mockQueryDeleteReservation, mockQueryAllLectures, mockQueryAllLectureHalls)); }