示例#1
0
 public MoviesController()
 {
     _moviesService     = new MoviesService();
     _seanceService     = new SeanceService();
     _salonService      = new SalonService();
     _moviesTypeService = new MoviesTypeService();
 }
示例#2
0
 public OrderService(IUserService userService, IBusySeatService seatsBusyService, ISeanceService seanceService, DB_Context context)
 {
     _userService      = userService;
     _seatsBusyService = seatsBusyService;
     _seanceService    = seanceService;
     unitOfWork        = new UnitOfWork(context);
 }
 public MyOrdersController(IOrderService orderService, ICinemaService cinemaService, IFilmService filmService, ISeanceService seanceService)
 {
     _orderService  = orderService;
     _filmService   = filmService;
     _cinemaService = cinemaService;
     _seanceService = seanceService;
 }
示例#4
0
 public OrderService(IAccountService userService, ISeatsBusyService seatsBusyService, ISeanceService seanceService, IUnitOfWork _unitOfWork)
 {
     _userService      = userService;
     _seatsBusyService = seatsBusyService;
     _seanceService    = seanceService;
     unitOfWork        = _unitOfWork;
 }
示例#5
0
 public SeanceInfoController(ISeanceService seanceService, IFilmService filmService, IBusySeatService seatsBusyService, ICinemaService cinemaService)
 {
     _seanceService    = seanceService;
     _filmService      = filmService;
     _seatsBusyService = seatsBusyService;
     _cinemaService    = cinemaService;
 }
示例#6
0
 public TicketController(ITicketService ticketService, IPaymentMethodService paymentMethodService, ISeanceService seanceService, IReservedSeatService reservedSeatService)
 {
     _ticketService        = ticketService;
     _paymentMethodService = paymentMethodService;
     _seanceService        = seanceService;
     _reservedSeatService  = reservedSeatService;
 }
 /// <summary>
 /// Crée la facade de la table seance
 /// </summary>
 /// <param name="seanceService">Le service de la table seance</param>
 public SeanceFacade(ISeanceService seanceService)
 {
     if (seanceService == null)
     {
         throw new FacadeException("Le service ne peut être null");
     }
     this.seanceService = seanceService;
 }
示例#8
0
        public void TestInit()
        {
            var list = new List <Seance>
            {
                new Seance()
                {
                    SeanceID   = 1,
                    Titre      = "Test Séance 1",
                    HeureDebut = new DateTime(2020, 1, 1, 12, 0, 0),
                    HeureFin   = new DateTime(2020, 1, 1, 15, 0, 0),
                    SalleID    = 1
                },
                new Seance()
                {
                    SeanceID   = 2,
                    Titre      = "Test Séance 2",
                    HeureDebut = new DateTime(2020, 1, 1, 15, 0, 0),
                    HeureFin   = new DateTime(2020, 1, 1, 18, 0, 0),
                    SalleID    = 1
                },
                new Seance()
                {
                    SeanceID   = 3,
                    Titre      = "Test Séance 3",
                    HeureDebut = new DateTime(2020, 1, 1, 18, 0, 0),
                    HeureFin   = new DateTime(2020, 1, 1, 21, 0, 0),
                    SalleID    = 1
                },
                new Seance()
                {
                    SeanceID   = 4,
                    Titre      = "Test Séance 4",
                    HeureDebut = new DateTime(2020, 1, 1, 12, 0, 0),
                    HeureFin   = new DateTime(2020, 1, 1, 15, 0, 0),
                    SalleID    = 2
                }
            };

            var data = list.AsQueryable();

            var mockSet = new Mock <DbSet <Seance> >();

            mockSet.As <IQueryable <Seance> >().Setup(m => m.Provider).Returns(data.Provider);
            mockSet.As <IQueryable <Seance> >().Setup(m => m.Expression).Returns(data.Expression);
            mockSet.As <IQueryable <Seance> >().Setup(m => m.ElementType).Returns(data.ElementType);
            mockSet.As <IQueryable <Seance> >().Setup(m => m.GetEnumerator()).Returns(() => data.GetEnumerator());
            mockSet.Setup(m => m.Add(It.IsAny <Seance>())).Callback <Seance>((s) => list.Add(s));
            mockSet.Setup(m => m.Find(It.IsAny <object[]>())).Returns <object[]>(x => list.FirstOrDefault(d => d.SeanceID == (int)x[0]));
            mockSet.Setup(m => m.Remove(It.IsAny <Seance>())).Callback <Seance>((s) => list.Remove(s));

            var mockContext = new Mock <CineDBEntities>();

            mockContext.Setup(c => c.Seances).Returns(mockSet.Object);

            service = new SeanceService(new EFSeanceRepository(mockContext.Object));
        }
 public SeancesController()
 {
     if (System.Web.HttpContext.Current.Session[SESSION_SS] == null)
     {
         seanceService = new SeanceService();
         System.Web.HttpContext.Current.Session[SESSION_SS] = seanceService;
     }
     else
     {
         seanceService = (SeanceService)System.Web.HttpContext.Current.Session[SESSION_SS];
     }
 }
示例#10
0
 public SeancesController(ISeanceService seanceService)
 {
     this.seanceService = seanceService;
 }
示例#11
0
 public SeancesController(ISeanceService seanceService, ICinemaService cinemaService, IFilmService filmService)
 {
     _seanceService = seanceService;
     _filmService   = filmService;
     _cinemaService = cinemaService;
 }
 public NavigationController(ISpectacleService spectacleService, ISeanceService seanceService)
 {
     mSpectacleService = spectacleService;
     mSeanceService = seanceService;
 }
示例#13
0
 public SeanceController(ISeanceService seanceService, IHallService hallService, IReservedSeatService reservedSeatService)
 {
     _seanceService       = seanceService;
     _hallService         = hallService;
     _reservedSeatService = reservedSeatService;
 }
示例#14
0
 public SeanceHub(ISeanceService seanceService, IReservedSeatService reservedSeatService)
 {
     _seanceService       = seanceService;
     _reservedSeatService = reservedSeatService;
 }
示例#15
0
 public SeanceController()
 {
     _seanceService = new SeanceService();
 }
示例#16
0
 public CinemasService(IUnitOfWork unitOfWork, IMapper mapper, ISeanceService seanceService)
 {
     _unitOfWork    = unitOfWork;
     _mapper        = mapper;
     _seanceService = seanceService;
 }
 public SpectacleController(ISeanceService seanceService, ISpectacleService spectacleService, ISeanceChangedNotificationService notificationService)
 {
     mSeanceService = seanceService;
     mSpectacleService = spectacleService;
     mNotificationService = notificationService;
 }
 public SeanceController(ISeanceService service)
 {
     _service = service;
 }
示例#19
0
 public SeancesController(ISeanceService seanceService, IMapper mapper)
 {
     this.seanceService = seanceService;
     this.mapper        = mapper;
 }
示例#20
0
 public HomeController(ISeanceService seanceService)
 {
     mSeanceService = seanceService;
 }
示例#21
0
 public HomeOrhestrator(ICinemaService cinemaService, IFilmService filmService, ISeanceService seanceService)
 {
     _cinemaService = cinemaService;
     _filmService   = filmService;
     _seanceService = seanceService;
 }