/// <summary>
 /// Constructor for Expiration service
 /// </summary>
 /// <param name="unitOfWork">Unit of work</param>
 /// <param name="pushNotificationFactory">Factory for push notifications</param>
 /// <param name="pushNotificationService">Service to send notifications</param>
 public ExpirationService(IUnitOfWork unitOfWork,
                          IPushNotificationFactory pushNotificationFactory,
                          IPushNotificationService pushNotificationService)
 {
     _unitOfWork = unitOfWork;
     _pushNotificationFactory = pushNotificationFactory;
     _pushNotificationService = pushNotificationService;
 }
Exemplo n.º 2
0
 public void Setup()
 {
     _mapper                  = Substitute.For <IMapper>();
     _orderRepository         = Substitute.For <IOrderRepository>();
     _unitOfWork              = Substitute.For <IUnitOfWork>();
     _pushNotificationFactory = Substitute.For <IPushNotificationFactory>();
     _pushNotificationService = Substitute.For <IPushNotificationService>();
     _orderService            = new OrderService(_mapper, _unitOfWork, _pushNotificationFactory, _pushNotificationService);
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="mapper">Used to map between domain classes and request/response/dto classes.</param>
 /// <param name="unitOfWork">Used to access the database repositories</param>
 /// <param name="pushNotificationFactory">Used to create new notifications</param>
 /// <param name="pushNotificationService">Used to send notifications</param>
 public OrderService(
     IMapper mapper,
     IUnitOfWork unitOfWork,
     IPushNotificationFactory pushNotificationFactory,
     IPushNotificationService pushNotificationService
     )
 {
     _mapper     = mapper;
     _unitOfWork = unitOfWork;
     _pushNotificationFactory = pushNotificationFactory;
     _pushNotificationService = pushNotificationService;
 }
 public PushNotificationService(IPushNotificationFactory notificationFactory,
                                ILogger <PushNotificationService> logger)
 {
     this.notificationFactory = notificationFactory;
     this.logger = logger;
 }
 public PushNotificationFacade(IPushNotificationFactory notificationFactory)
 {
     _notificationFactory = notificationFactory ?? throw new ArgumentNullException(nameof(notificationFactory));
 }