protected override void ConfigureApplicationContainer(TinyIoCContainer container) { base.ConfigureApplicationContainer(container); var eventsStore = new EventsStore(); var sessionsRepository = new SessionsRepository(eventsStore); var timelineMessageRepository = new TimelineMessageRepository(); var followersRepository = new FollowersRepository(); var subscriptionsRepository = new SubscriptionsRepository(eventsStore, followersRepository); var eventPublisher = new EventPublisher(); var eventPublisherWithStorage = new EventPublisherWithStorage(eventsStore, eventPublisher); eventPublisher.Subscribe(new SessionHandler(sessionsRepository)); eventPublisher.Subscribe(new UpdateTimeline(timelineMessageRepository)); eventPublisher.Subscribe(new NotifyFollowerOfFolloweeMessage(followersRepository, subscriptionsRepository, eventPublisherWithStorage)); eventPublisher.Subscribe(new UpdateFollowers(followersRepository)); container.Register <IEventPublisher>(eventPublisherWithStorage); container.Register <IUserIdentitiesRepository>(new UserIdentitiesRepository(eventsStore)); container.Register <ISessionsRepository>(sessionsRepository); container.Register <ITimelineMessageRepository>(timelineMessageRepository); container.Register <IMessagesRepository>(new MessagesRepository(eventsStore)); }
public TimelineMessagesRepositoryTest() { _repository = new TimelineMessageRepository(); }
public UpdateTimelineTest() { _repository = new TimelineMessageRepository(); _handler = new UpdateTimeline(_repository); }