Example #1
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));
        }
Example #2
0
 public void Init()
 {
     AutoMapperConfig.Init();
     mockDb = TestDatabaseFactory.CreateDatabase();
     mockQueryAllLecturers = new GetAllLecturersQuery(mockDb);
 }
Example #3
0
 public void Init()
 {
     AutoMapperConfig.Init();
     _mockDb = TestDatabaseFactory.CreateDatabase();
     _mockQueryAllSubjects = new GetAllSubjectsQuery(_mockDb);
 }