示例#1
0
        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");
        }
示例#2
0
        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);
        }
示例#3
0
 public CardQueryParser(
     MtgAnalyzer analyzer,
     CardRepository repository,
     CardDocumentAdapter adapter,
     string language)
     : base(analyzer, adapter, language)
 {
     _repository = repository;
 }
示例#4
0
 public SearchResultHighlighter(
     ISearchSubsystem searchSubsystem,
     IDocumentAdapterBase adapter,
     IKeywordHighlighter keywordHighlighter)
 {
     _searchSubsystem    = searchSubsystem;
     _adapter            = adapter;
     _keywordHighlighter = keywordHighlighter;
     _analyzer           = new MtgAnalyzer(adapter);
 }
示例#5
0
 public DeckQueryParser(MtgAnalyzer analyzer, DeckDocumentAdapter adapter)
     : base(analyzer, adapter, CardLocalization.DefaultLanguage)
 {
 }