public Server(IEventPublisher eventPublisher, IDomainModelStateManager stateManager, ICommandProcessorFactory commandProcessorFactory, IUnitOfWorkFactory unitOfWorkFactory) { _eventPublisher = eventPublisher; _stateManager = stateManager; _commandProcessorFactory = commandProcessorFactory; _unitOfWorkFactory = unitOfWorkFactory; }
public void Setup() { this.commandParser = Mock.Of <ICommandParser>(); this.validCommandsCatalog = Mock.Of <IValidCommandsCatalog>(); this.commandProcessorFactory = Mock.Of <ICommandProcessorFactory>(); Mock.Get(this.validCommandsCatalog).Setup(x => x.GetValidCommands()).Returns(new[] { "stock" }); this.sut = new ChatBot(this.commandParser, this.validCommandsCatalog, this.commandProcessorFactory); }
public HattemSessionFactoryMock( ICommandProcessorFactory <HattemSessionMock> commandProcessorFactory, INotificationPublisher <HattemSessionMock> notificationPublisher, IQueryProcessorFactory <HattemSessionMock> queryProcessorFactory ) { _commandProcessor = commandProcessorFactory?.Create() ?? throw new ArgumentNullException(nameof(commandProcessorFactory)); _queryProcessor = queryProcessorFactory?.Create() ?? throw new ArgumentNullException(nameof(queryProcessorFactory)); _notificationPublisher = notificationPublisher ?? throw new ArgumentNullException(nameof(notificationPublisher)); }
public SqlHattemSessionFactory( ICommandProcessorFactory <SqlHattemSession> commandProcessorFactory, INotificationPublisher <SqlHattemSession> notificationPublisher, IQueryProcessorFactory <SqlHattemSession> queryProcessorFactory, IDbConnectionFactory dbConnectionFactory ) { _commandProcessor = commandProcessorFactory?.Create() ?? throw new ArgumentNullException(nameof(commandProcessorFactory)); _queryProcessor = queryProcessorFactory?.Create() ?? throw new ArgumentNullException(nameof(queryProcessorFactory)); _notificationPublisher = notificationPublisher ?? throw new ArgumentNullException(nameof(notificationPublisher)); _dbConnectionFactory = dbConnectionFactory ?? throw new ArgumentNullException(nameof(dbConnectionFactory)); }
public Connection( IErrorReporter errorReporter, IDataEnumeratorFactory dataEnumeratorFactory, ICommandProcessorFactory commandProcessorFactory, ISchemaUpdater schemaUpdater) { _errorReporter = errorReporter; _dataEnumeratorFactory = dataEnumeratorFactory; _commandProcessorFactory = commandProcessorFactory; _schemaUpdater = schemaUpdater; _activeCount++; }
public CommandProcessor(ICommandProcessorFactory commandProcessorFactory, User myUser, Bot myBot) { _commandProcessorFactory = commandProcessorFactory; _myUser = myUser; _myBot = myBot; }
public ExampleController(ICommandProcessorFactory commandProcessorFactory) { _commandProcessorFactory = commandProcessorFactory ?? throw new ArgumentNullException(nameof(commandProcessorFactory)); }
public ChatBot(ICommandParser commandParser, IValidCommandsCatalog validCommandsCatalog, ICommandProcessorFactory commandProcessorFactory) { this.commandParser = commandParser; this.validCommandsCatalog = validCommandsCatalog; this.commandProcessorFactory = commandProcessorFactory; }