Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AbpPushRequestPublisher"/> class.
        /// </summary>
        public AbpPushRequestPublisher(
            IPushRequestStore pushRequestStore,
            IBackgroundJobManager backgroundJobManager,
            IPushRequestDistributor pushRequestDistributor,
            IAbpPushConfiguration pushConfiguration,
            IGuidGenerator guidGenerator
            )
        {
            RequestStore         = pushRequestStore;
            BackgroundJobManager = backgroundJobManager;
            RequestDistributor   = pushRequestDistributor;
            Configuration        = pushConfiguration;
            GuidGenerator        = guidGenerator;

            AbpSession = NullAbpSession.Instance;
        }
Beispiel #2
0
 public PushRequestPublisher_Tests()
 {
     _store = Substitute.For <IPushRequestStore>();
     _backgroundJobManager = Substitute.For <IBackgroundJobManager>();
     _distributor          = Substitute.For <IPushRequestDistributor>();
     _configuration        = Substitute.For <IAbpPushConfiguration>();
     _generator            = Substitute.For <IGuidGenerator>();
     _publisher            = new AbpPushRequestPublisher(
         _store,
         _backgroundJobManager,
         _distributor,
         _configuration,
         _generator
         );
     _publisher.UnitOfWorkManager = Substitute.For <IUnitOfWorkManager>();
     _publisher.UnitOfWorkManager.Current.Returns(Substitute.For <IActiveUnitOfWork>());
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PushRequestDistributionJob"/> class.
 /// </summary>
 public PushRequestDistributionJob(IPushRequestDistributor pushRequestDistributer)
 {
     _pushRequestDistributor = pushRequestDistributer;
 }