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; }
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); }
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; }
public TicketService( IDateTimeService dateTimeService, IConferencesRepository conferencesRepository, ITicketsRepository ticketsRepository, ITicketSaleRepository ticketSaleRepository, ITicketsFactory ticketsFactory) { _dateTimeService = dateTimeService; _conferencesRepository = conferencesRepository; _ticketsRepository = ticketsRepository; _ticketSaleRepository = ticketSaleRepository; _ticketsFactory = ticketsFactory; }
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); }
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); }
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(); }
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; }
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); }
public TicketsController(ITicketsRepository repository) { _repository = repository; }
public TicketAttachmentController() { this.ticketRepo = new TicketsRepository(new PlusBContext()); }
public TicketsService(ITicketsRepository ticketsRepository, IMapper mapper) : base(ticketsRepository) { _ticketsRepo = ticketsRepository; _mapper = mapper; }
public ReservationsController(ITicketsRepository ticketsRepository, CinemaDbContext context, UserManager <IdentityUser> userManager) { this.ticketsRepo = ticketsRepository; _context = context; _userManager = userManager; }
public TicketManagerService(ITicketsRepository ticketsRepository) { _ticketsRepository = ticketsRepository; }
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; }
public TicketRedirectService(ITicketsRepository tickets, IJwtTokenService tokenService) { _tickets = tickets; _tokenService = tokenService; }
public TicketManagerBuilder WithITicketsRepository(ITicketsRepository ticketsRepository) { this.ticketsRepository = ticketsRepository; return(this); }
public TicketsController(ITicketsRepository ticketsRepository, TicketPriceCalculator ticketPriceCalculator, TicketPaymentService ticketPaymentService) { _ticketsRepository = ticketsRepository; _ticketPriceCalculator = ticketPriceCalculator; _ticketPaymentService = ticketPaymentService; }
public TicketPaymentService(TicketPriceCalculator ticketPriceCalculator, ITicketsRepository ticketsRepository) { _ticketPriceCalculator = ticketPriceCalculator; _ticketsRepository = ticketsRepository; }
public AppService(ITicketsRepository ticketRepository, IPersonRepository personRepository) { _ticketRepository = ticketRepository; _personRepository = personRepository; }
public TicketSalesService(ITicketsRepository ticketsRepository) { _ticketsRepository = ticketsRepository; }
public TicketsService(ITicketsRepository repository) { this.repository = repository; }
public TicketCrudService( ITicketsRepository ticketsRepository) { _ticketsRepository = ticketsRepository; }
public MeetingsController(ITicketsRepository repo) { _repo = repo; }
public TicketsService([NotNull] ITicketsRepository ticketsRepository) { _ticketsRepository = ticketsRepository; }
public DashboardController(ITicketsRepository repository) { _repository = repository; }
public TicketsController(ITicketsRepository repo) { _repo = repo; }