public OperationsTest() { Mock <InvertedIndex> MockIndex = new Mock <InvertedIndex>(); InvertedIndexMock.MockIndex(MockIndex); Operations = new Operations(MockIndex.Object); }
public void SearchQueryTest() { Mock <InvertedIndex> mockIndex = new Mock <InvertedIndex>(); InvertedIndexMock.MockIndex(mockIndex); var query = SampleCreator.CreateQueryString(); Assert.Equal(new HashSet <int> { 1 }, new SearchEngine(mockIndex.Object).SearchQuery(query)); }