private static TicketsController GetTicketsController(ITicketsRepository repository)
        {
            var controller = new TicketsController(repository);
            controller.ControllerContext = new ControllerContext
            {
                Controller = controller,
                RequestContext = new RequestContext(new MockHttpContext(), new RouteData())
            };

            return controller;
        }
Exemple #2
0
        private static TicketsController GetTicketsController(ITicketsRepository repository)
        {
            var controller = new TicketsController(repository);

            controller.ControllerContext = new ControllerContext
            {
                Controller     = controller,
                RequestContext = new RequestContext(new MockHttpContext(), new RouteData())
            };

            return(controller);
        }
Exemple #3
0
 public TicketDeliveryController(EventsDbContext context,
                                 ITicketsRepository ticketsRepository,
                                 ITicketDeliveryService ticketDeliveryService,
                                 ITicketRedirectService ticketRedirectService,
                                 IBackgroundJobClient backgroundJobs)
 {
     _context               = context;
     _ticketsRepository     = ticketsRepository;
     _ticketDeliveryService = ticketDeliveryService;
     _ticketRedirectService = ticketRedirectService;
     _backgroundJobs        = backgroundJobs;
 }
 public TicketSalesService(
     IConferencesRepository conferenceRepository,
     ITicketSaleRepository ticketSaleRepository,
     ITicketsRepository ticketRepository,
     ITicketsFactory ticketsFactory,
     IDateTimeService dateTimeService)
 {
     _conferenceRepository = conferenceRepository;
     _ticketSaleRepository = ticketSaleRepository;
     _ticketRepository     = ticketRepository;
     _ticketsFactory       = ticketsFactory;
     _dateTimeService      = dateTimeService;
 }
Exemple #5
0
 public TicketService(
     IDateTimeService dateTimeService,
     IConferencesRepository conferencesRepository,
     ITicketsRepository ticketsRepository,
     ITicketSaleRepository ticketSaleRepository,
     ITicketsFactory ticketsFactory)
 {
     _dateTimeService       = dateTimeService;
     _conferencesRepository = conferencesRepository;
     _ticketsRepository     = ticketsRepository;
     _ticketSaleRepository  = ticketSaleRepository;
     _ticketsFactory        = ticketsFactory;
 }
Exemple #6
0
 public TicketDeliveryService(ITicketsRepository ticketsRepo,
                              ITicketDeliveryDataRepository ticketDataRepo,
                              IEmailService emailService,
                              IPdfTicketService pdfTicketService,
                              IAuditEventLog auditEventLog,
                              ILogger <TicketDeliveryService> logger)
 {
     _ticketsRepo      = ticketsRepo;
     _ticketDataRepo   = ticketDataRepo;
     _emailService     = emailService;
     _pdfTicketService = pdfTicketService;
     _auditEventLog    = auditEventLog;
     _logger           = logger;
 }
        public CateGoryManager(IEmailSender emailSender,
                               ICache <CateGoryManager> cache,
                               ICateGoryRepository repository,
                               ICateGoryTicketRepository cgtRepo,
                               ITicketsRepository tickRepo
                               )
        {
            this.emailSender = emailSender;
            this.cache       = cache;

            this.cgRepo     = repository;
            this.cgtRepo    = cgtRepo;
            this.ticketRepo = tickRepo;
        }
        public TiketService()
        {
            //_ticketRepository = new TicketRepositoryList();
            //_ticketRepository = new TicketRepository();
            _ticketRepository = new TicketEFRepository();

            var mapperConfig = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <TiketModel, Ticket>().ReverseMap();
                cfg.CreateMap <DepartmentModel, Department>().ReverseMap();
            });

            _mapper = new Mapper(mapperConfig);
        }
Exemple #9
0
        public void Init()
        {
            ILogger logger = A.Fake <ILogger>();

            ITicketsRepository ticketsRepository = A.Fake <ITicketsRepository>();

            A.CallTo(() => ticketsRepository.CreateAsync(A <TicketRequest> .Ignored))
            .Returns(createdTicketRequestId);

            IEmailService emailService = A.Fake <IEmailService>();

            ISystemTime systemTime = A.Fake <ISystemTime>();

            this.sut = new TicketManager(logger, ticketsRepository, emailService, systemTime);
        }
Exemple #10
0
        public async Task RaiseTicketAsync_WithValidTicketRequest_ShouldBeCreatedInRepository()
        {
            // Arrange
            ITicketsRepository ticketsRepositoryMock = A.Fake <ITicketsRepository>();

            TicketRequest ticketRequest = new TicketRequestBuilder().Build();

            TicketManager sut = new TicketManagerBuilder()
                                .WithITicketsRepository(ticketsRepositoryMock)
                                .Build();

            // Act
            await sut.RaiseTicketAsync(ticketRequest);

            // Assert
            A.CallTo(
                () => ticketsRepositoryMock.CreateAsync(
                    A <TicketRequest> .That.Matches(x => x == ticketRequest))).MustHaveHappenedOnceExactly();
        }
Exemple #11
0
 public TicketsManager(
     IEmailSender emailSender,
     ITicketsRepository ticketsRespository,
     ICache <TicketsManager> cache,
     ITicketsUserRepository tUserRespository,
     ITicketsOrderRespository ticketOrderRespository,
     ITicketsRelationRespository trRespository,
     ITaskRespository taskRespository,
     ITicketsHistoryRepository HistoryRepository,
     ITicketEsDetailRespository EsRepository
     )
 {
     this.emailSender            = emailSender;
     this.ticketRepository       = ticketsRespository;
     this.cache                  = cache;
     this.ticketUserRpst         = tUserRespository;
     this.trRespository          = trRespository;
     this.ticketOrderRespository = ticketOrderRespository;
     this.taskRepository         = taskRespository;
     this.HistoryRepository      = HistoryRepository;
     this.esRepository           = EsRepository;
 }
Exemple #12
0
        public async Task RaiseTicketAsync_WhenTicketRequestIsCreated_ReturnTicketRequestId()
        {
            // Arrange
            int expectedId = 1;

            ITicketsRepository ticketsRepositoryStub = A.Fake <ITicketsRepository>();

            A.CallTo(() => ticketsRepositoryStub.CreateAsync(A <TicketRequest> .Ignored))
            .Returns(expectedId);

            TicketManager sut = new TicketManagerBuilder()
                                .WithITicketsRepository(ticketsRepositoryStub)
                                .Build();

            TicketRequest request = new TicketRequestBuilder().Build();

            // Act
            int actualId = await sut.RaiseTicketAsync(request);

            // Assert
            actualId.Should().Be(expectedId);
        }
        public async Task RaiseTicketAsync_WhenTicketRequestIsCreated_ShouldReturnId()
        {
            // Arrange
            int expectedId = 1;

            ILogger       logger       = A.Fake <ILogger>();
            IEmailService emailService = A.Fake <IEmailService>();
            ISystemTime   systemTime   = A.Fake <ISystemTime>();

            ITicketsRepository ticketsRepository = A.Fake <ITicketsRepository>();

            A.CallTo(() => ticketsRepository.CreateAsync(A <TicketRequest> .Ignored))
            .Returns(expectedId);

            TicketManager sut = new TicketManager(logger, ticketsRepository, emailService, systemTime);

            TicketRequest request = new TicketRequest("foo", "foo", 1);

            // Act
            int actualId = await sut.RaiseTicketAsync(request);

            // Assert
            actualId.Should().Be(expectedId);
        }
Exemple #14
0
 public TicketsController(ITicketsRepository repository)
 {
     _repository = repository;
 }
 public TicketAttachmentController()
 {
     this.ticketRepo = new TicketsRepository(new PlusBContext());
 }
Exemple #16
0
 public TicketsService(ITicketsRepository ticketsRepository,
                       IMapper mapper) : base(ticketsRepository)
 {
     _ticketsRepo = ticketsRepository;
     _mapper      = mapper;
 }
Exemple #17
0
 public ReservationsController(ITicketsRepository ticketsRepository, CinemaDbContext context, UserManager <IdentityUser> userManager)
 {
     this.ticketsRepo = ticketsRepository;
     _context         = context;
     _userManager     = userManager;
 }
 public TicketManagerService(ITicketsRepository ticketsRepository)
 {
     _ticketsRepository = ticketsRepository;
 }
Exemple #19
0
 public TicketsService(ITicketsRepository Repository)
 {
     _Repository = Repository;
 }
 public HomeController(IIdentiService identiService, IEventsRepository eventsRepository, ITicketsRepository ticketsRepository,
                       IOrderService orderService, IEventManagementService eventManagementService) : base()
 {
     _identiService          = identiService;
     _eventsRepository       = eventsRepository;
     _ticketsRepository      = ticketsRepository;
     _orderService           = orderService;
     _eventManagementService = eventManagementService;
 }
Exemple #21
0
 public TicketRedirectService(ITicketsRepository tickets, IJwtTokenService tokenService)
 {
     _tickets      = tickets;
     _tokenService = tokenService;
 }
 public TicketManagerBuilder WithITicketsRepository(ITicketsRepository ticketsRepository)
 {
     this.ticketsRepository = ticketsRepository;
     return(this);
 }
Exemple #23
0
 public TicketsController(ITicketsRepository ticketsRepository, TicketPriceCalculator ticketPriceCalculator, TicketPaymentService ticketPaymentService)
 {
     _ticketsRepository     = ticketsRepository;
     _ticketPriceCalculator = ticketPriceCalculator;
     _ticketPaymentService  = ticketPaymentService;
 }
 public TicketPaymentService(TicketPriceCalculator ticketPriceCalculator, ITicketsRepository ticketsRepository)
 {
     _ticketPriceCalculator = ticketPriceCalculator;
     _ticketsRepository     = ticketsRepository;
 }
Exemple #25
0
 public AppService(ITicketsRepository ticketRepository, IPersonRepository personRepository)
 {
     _ticketRepository = ticketRepository;
     _personRepository = personRepository;
 }
 public TicketSalesService(ITicketsRepository ticketsRepository)
 {
     _ticketsRepository = ticketsRepository;
 }
 public TicketsController(ITicketsRepository repository)
 {
     _repository = repository;
 }
 public TicketsService(ITicketsRepository repository)
 {
     this.repository = repository;
 }
Exemple #29
0
 public TicketCrudService(
     ITicketsRepository ticketsRepository)
 {
     _ticketsRepository = ticketsRepository;
 }
Exemple #30
0
 public MeetingsController(ITicketsRepository repo)
 {
     _repo = repo;
 }
Exemple #31
0
 public TicketsService([NotNull] ITicketsRepository ticketsRepository)
 {
     _ticketsRepository = ticketsRepository;
 }
 public DashboardController(ITicketsRepository repository)
 {
     _repository = repository;
 }
 public TicketsController(ITicketsRepository repo)
 {
     _repo = repo;
 }