public IndexedFieldLookupTests() { IObjectTokenization itemConfig = new ObjectTokenizationBuilder <string, string>() .WithKey(i => i) .WithField("Field1", r => r) .WithField("Field2", r => r) .WithField("Field3", r => r) .WithField("FieldX", r => r, o => o.WithStemming()) .WithField("FieldY", r => r) .Build(); this.sut = new IndexedFieldLookup( itemConfig.GetConfiguredFields(), new PlainTextExtractor(), Tokenizer.Default); }
public IndexedFieldLookupTests() { var itemConfig = new ItemTokenizationOptionsBuilder <string, string>() .WithKey(i => i) .WithField("Field1", r => r) .WithField("Field2", r => r) .WithField("Field3", r => r) .WithField("FieldX", r => r, o => o.WithStemming()) .WithField("FieldY", r => r) .Build(); this.tokenizerFactoryMock = new Mock <ITokenizerFactory>(); this.tokenizerFactoryMock.Setup(f => f.Create(TokenizationOptions.Default)).Returns(defaultTokenizer); this.tokenizerFactoryMock.Setup(f => f.Create(It.Is <TokenizationOptions>(o => o.Stemming))).Returns(stemmingTokenizer); this.sut = new IndexedFieldLookup(itemConfig.FieldTokenization, this.tokenizerFactoryMock.Object, TokenizationOptions.Default); }
public IndexedFieldLookupTests() { this.sut = new IndexedFieldLookup(); }