private ProjectionsService GetProjectionsService(
            EfDeletableEntityRepository <Projection> projectionsRepository,
            ApplicationDbContext context)
        {
            var seatsRepositoryMock          = new Mock <EfDeletableEntityRepository <Seat> >(context);
            var projectionSeatRepositoryMock = new Mock <EfDeletableEntityRepository <ProjectionSeat> >(context);

            var listOfSeats = new List <Seat>();

            for (int i = 0; i < 50; i++)
            {
                listOfSeats.Add(new Seat {
                    HallId = 1
                });
            }

            seatsRepositoryMock.Setup(s => s.All()).Returns(listOfSeats.AsQueryable);

            var projectionsService = new ProjectionsService(
                projectionsRepository,
                projectionSeatRepositoryMock.Object,
                seatsRepositoryMock.Object);

            return(projectionsService);
        }
        private ProjectionsService ProjectionServiceTest()
        {
            var options = new DbContextOptionsBuilder <ApplicationDbContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()).Options;

            var dbContext = new ApplicationDbContext(options);

            var projectionsRepository = new EfRepository <Projection>(dbContext);
            var moviesRepository      = new EfRepository <Movie>(dbContext);
            var cinemaRepository      = new EfRepository <Cinema>(dbContext);
            var hallsRepository       = new EfRepository <Hall>(dbContext);
            var seatsRepository       = new EfRepository <Seat>(dbContext);
            var ticketsRepository     = new EfRepository <Ticket>(dbContext);

            var projectionsService = new ProjectionsService(
                projectionsRepository,
                moviesRepository,
                cinemaRepository,
                hallsRepository,
                seatsRepository,
                ticketsRepository);

            return(projectionsService);
        }