public SendStoryHandlerTests()
 {
     _userRepository        = Substitute.For <IUserRepository>();
     _storyRepository       = Substitute.For <IStoryRepository>();
     _storyTextFactory      = Substitute.For <IStoryTextFactory>();
     _storyAuthorPolicy     = Substitute.For <IStoryAuthorPolicy>();
     _domainEventDispatcher = Substitute.For <IDomainEventDispatcher>();
     _clock               = Substitute.For <IClock>();
     _idGenerator         = Substitute.For <IIdGenerator>();
     _storyRequestStorage = Substitute.For <IStoryRequestStorage>();
     _eventMapper         = Substitute.For <IEventMapper>();
     _messageBroker       = Substitute.For <IMessageBroker>();
     _handler             = new SendStoryHandler(_userRepository, _storyRepository, _storyTextFactory, _storyAuthorPolicy,
                                                 _domainEventDispatcher, _clock, _idGenerator, _storyRequestStorage, _eventMapper, _messageBroker);
 }
Пример #2
0
 public SendStoryHandler(IUserRepository userRepository, IStoryRepository storyRepository,
                         IStoryTextFactory storyTextFactory, IStoryAuthorPolicy storyAuthorPolicy,
                         IDomainEventDispatcher domainEventDispatcher, IClock clock, IIdGenerator idGenerator,
                         IStoryRequestStorage storyRequestStorage, IEventMapper eventMapper, IMessageBroker messageBroker)
 {
     _userRepository        = userRepository;
     _storyRepository       = storyRepository;
     _storyTextFactory      = storyTextFactory;
     _storyAuthorPolicy     = storyAuthorPolicy;
     _domainEventDispatcher = domainEventDispatcher;
     _clock               = clock;
     _idGenerator         = idGenerator;
     _storyRequestStorage = storyRequestStorage;
     _eventMapper         = eventMapper;
     _messageBroker       = messageBroker;
 }