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;
 }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }