public RedditBot(IWordParser wordParser, IEntityDbManager dbManager) { _cookieJar = new CookieContainer(); _redditClient = new WebClient(); _wordParser = wordParser; _dbManager = dbManager; Login(); _me = GetMe(); }
public HandlerTests() { _configuration = Utility.LoadConfiguration(); _wordParser = new WordParser(_configuration); _sentenceParser = new SentenceParser(_wordParser, _configuration); var handlers = Utility.LoadHandlers(_configuration); _declarativeSentenceHandler = handlers.Handlers[SentenceType.Declarative] as DeclarativeSentenceHandler; _imperativeSentenceHandler = handlers.Handlers[SentenceType.Imperative] as ImperativeSentenceHandler; _interrogativeSentenceHandler = handlers.Handlers[SentenceType.Interrogative] as InterrogativeSentenceHandler; }
public void GetWords_ReturnFail_OnUncorrectPatCreator() { var pathCreater = A.Fake <IPathCreator>(); A.CallTo(() => pathCreater.GetCurrentPath()).Returns("Incorrect path"); A.CallTo(() => textReader.ReadStrings(null)) .WithAnyArguments().Returns(new string[] { "asdf" }); parser = new TextProcessing.LiteratureTextParser(pathCreater, textReader); var parseResult = parser.GetWords(null); parseResult.IsSuccess.Should().BeFalse(); parseResult.Error.Should().Contain("Not found dictionaries"); }
public DocumentRepository( ILogger <DocumentRepository> logger, IOptionsMonitor <AppOptions> appOptions, GraphSharePointAppService graphSharePointAppService, IOpportunityRepository opportunityRepository, IWordParser wordParser, IPowerPointParser powerPointParser) : base(logger, appOptions) { Guard.Against.Null(graphSharePointAppService, nameof(graphSharePointAppService)); Guard.Against.Null(opportunityRepository, nameof(opportunityRepository)); Guard.Against.Null(wordParser, nameof(wordParser)); Guard.Against.Null(powerPointParser, nameof(powerPointParser)); _graphSharePointAppService = graphSharePointAppService; _opportunityRepository = opportunityRepository; _wordParser = wordParser; _powerPointParser = powerPointParser; }
public DocumentRepository( ILogger <DocumentRepository> logger, IOptions <AppOptions> appOptions, GraphSharePointAppService graphSharePointAppService, IOpportunityRepository opportunityRepository, IRoleMappingRepository roleMappingRepository, IWordParser wordParser) : base(logger, appOptions) { Guard.Against.Null(graphSharePointAppService, nameof(graphSharePointAppService)); Guard.Against.Null(opportunityRepository, nameof(opportunityRepository)); Guard.Against.Null(roleMappingRepository, nameof(roleMappingRepository)); Guard.Against.Null(wordParser, nameof(wordParser)); _graphSharePointAppService = graphSharePointAppService; _opportunityRepository = opportunityRepository; _roleMappingRepository = roleMappingRepository; _wordParser = wordParser; }
public void SetUp() { textParser = A.Fake <IWordParser>(); frequencyAnalyzer = new FrequencyAnalyzer(textParser); }
public void SetUp() { textReader = A.Fake <ITextReader>(); parser = new TextProcessing.LiteratureTextParser(new PathCreator(), textReader); }
public TextParser(ITextReader reader, IWordChanger wordChanger, IWordParser wordParser) { textReader = reader; this.wordChanger = wordChanger; this.wordParser = wordParser; }
public SentenceParser(IWordParser wordParser, IConfiguration configuration) { _wordParser = wordParser; _configuration = configuration; _sentences = new List<Sentence>(); }
public WordParserTests() { _configuration = Utility.LoadConfiguration(); _wordParser = new WordParser(_configuration); }
public SentenceParserTests() { _configuration = Utility.LoadConfiguration(); _wordParser = new WordParser(_configuration); _sentenceParser = new SentenceParser(_wordParser, _configuration); }
public FrequencyAnalyzer(IWordParser wordParser) { parser = wordParser; }