public void Power_toughness_buff_text_is_treated_as_one_word() { var analyzer = new MtgAnalyzer(new CardDocumentAdapter(null)); var tokens = analyzer.GetTokens("TextEn", "Add +1/+1 counter"); tokens.Select(_ => _.Term).Should().BeEquivalentTo("add", "+1/+1", "counter"); }
public void Mana_symbols_are_treated_as_words(string field, string value, params string[] expectedWords) { var analyzer = new MtgAnalyzer(new CardDocumentAdapter(null)); var tokens = analyzer.GetTokens(field, value).Select(_ => _.Term); tokens.Should().BeEquivalentTo(expectedWords); }
public CardQueryParser( MtgAnalyzer analyzer, CardRepository repository, CardDocumentAdapter adapter, string language) : base(analyzer, adapter, language) { _repository = repository; }
public SearchResultHighlighter( ISearchSubsystem searchSubsystem, IDocumentAdapterBase adapter, IKeywordHighlighter keywordHighlighter) { _searchSubsystem = searchSubsystem; _adapter = adapter; _keywordHighlighter = keywordHighlighter; _analyzer = new MtgAnalyzer(adapter); }
public DeckQueryParser(MtgAnalyzer analyzer, DeckDocumentAdapter adapter) : base(analyzer, adapter, CardLocalization.DefaultLanguage) { }