public UserNotificationService(IEnumerable <ICommunicationChannel> channels,
                                IAppStore appStore,
                                ILogStore logStore,
                                IUserEventQueue userEventQueue,
                                IUserNotificationFactory userNotificationFactory,
                                IUserNotificationStore userNotificationsStore,
                                IUserStore userStore,
                                IClock clock)
 {
     this.appStore                = appStore;
     this.channels                = channels;
     this.logStore                = logStore;
     this.userEventQueue          = userEventQueue;
     this.userNotificationFactory = userNotificationFactory;
     this.userNotificationsStore  = userNotificationsStore;
     this.userStore               = userStore;
     this.clock = clock;
 }
        public UserNotificationFactoryTests()
        {
            app = new App
            {
                Languages = new string[]
                {
                    "en",
                    "de"
                }
            };

            A.CallTo(() => clock.GetCurrentInstant())
            .Returns(now);

            A.CallTo(() => notificationUrl.TrackConfirmed(A <Guid> ._, A <string> ._))
            .ReturnsLazily(new Func <Guid, string, string>((id, lang) => $"confirm/{id}/?lang={lang}"));

            A.CallTo(() => notificationUrl.TrackSeen(A <Guid> ._, A <string> ._))
            .ReturnsLazily(new Func <Guid, string, string>((id, lang) => $"seen/{id}/?lang={lang}"));

            sut = new UserNotificationFactory(clock, logStore, notificationUrl);
        }
示例#3
0
 public UserNotificationService(IEnumerable <ICommunicationChannel> channels,
                                IAppStore appStore,
                                ILogStore logStore,
                                IMessageProducer <ConfirmMessage> confirmProducer,
                                IUserEventQueue userEventQueue,
                                IUserNotificationFactory userNotificationFactory,
                                IUserNotificationStore userNotificationsStore,
                                IUserStore userStore,
                                ILogger <UserNotificationService> log,
                                IClock clock)
 {
     this.appStore                = appStore;
     this.channels                = channels;
     this.log                     = log;
     this.logStore                = logStore;
     this.confirmProducer         = confirmProducer;
     this.userEventQueue          = userEventQueue;
     this.userNotificationFactory = userNotificationFactory;
     this.userNotificationsStore  = userNotificationsStore;
     this.userStore               = userStore;
     this.clock                   = clock;
 }