public UnitTest1()
        {
            var settings = new TestBotSettings();
            var connectionStringFactory = new TestConnectionStringFactory();
            var coinmarkcapClient       = new CoinMarketCapClientCachingDecorator(new CoinMarketCapClient());
            var fixerClient             = new FixerClientCachingDecorator(new FixerClient());
            var currencyConverter       = new CurrencyConverter(coinmarkcapClient, fixerClient);
            var redditClientFactory     = new RedditClientFactory();

            this.currencyService      = new CurrencyService(connectionStringFactory);
            this.remindRequestService = new RemindRequestService(connectionStringFactory);
            var tokenConverter      = new TokenConverter(currencyConverter, currencyService, coinmarkcapClient, fixerClient);
            var tokenQueueFactory   = new TokenQueueFactory();
            var interpreterFactory  = new InterpreterFactory(tokenConverter, currencyService, tokenQueueFactory);
            var expressionExtractor = new ExpressionExtractor(interpreterFactory);

            this.unreadMessageReader  = new RedditUnreadMessagesReader(settings, remindRequestService, expressionExtractor, redditClientFactory);
            this.remindRequestHandler = new RemindRequestHandler(settings, remindRequestService, interpreterFactory, redditClientFactory);
        }
Beispiel #2
0
 public RedditUnreadMessagesReader(IBotSettings botSettings, IRemindRequestService remindRequestService, ExpressionExtractor expressionExtractor, RedditClientFactory clientFactory)
 {
     this.client = clientFactory.Create(botSettings);
     this.expressionExtractor  = expressionExtractor;
     this.remindRequestService = remindRequestService;
 }
 public RemindRequestHandler(IBotSettings botSettings, IRemindRequestService remindRequestService, InterpreterFactory interpreterFactory, RedditClientFactory clientFactory)
 {
     this.client = clientFactory.Create(botSettings);
     this.remindRequestService = remindRequestService;
     this.interpreterFactory   = interpreterFactory;
 }