Ejemplo n.º 1
0
        public OperationsTest()
        {
            Mock <InvertedIndex> MockIndex = new Mock <InvertedIndex>();

            InvertedIndexMock.MockIndex(MockIndex);
            Operations = new Operations(MockIndex.Object);
        }
Ejemplo n.º 2
0
        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));
        }