protected void AssertIndices(ISearchableIndex <string> expected, ISearchableIndex <string> actual) { foreach (var word in IndexHelper.Results.Keys) { Assert.Equal(expected.Search(word), actual.Search(word)); Assert.Equal(expected.GetCount(word), actual.GetCount(word)); } Assert.Equal(expected.GetAll(), actual.GetAll()); Assert.Equal(expected.GetCount(), actual.GetCount()); }
public BooleanSearchEngine(ISearchableIndex <T> index, Func <string, T> tokenConvertor) { this.index = index; this.tokenConvertor = tokenConvertor; }