use of org.eclipse.che.api.vfs.search.Searcher in project che by eclipse.
the class MemoryVirtualFileSystemTest method setUp.
@Before
public void setUp() throws Exception {
SearcherProvider searcherProvider = mock(SearcherProvider.class);
searcher = mock(Searcher.class);
closeCallback = mock(AbstractVirtualFileSystemProvider.CloseCallback.class);
fileSystem = new MemoryVirtualFileSystem(mock(ArchiverFactory.class), searcherProvider, closeCallback);
when(searcherProvider.getSearcher(eq(fileSystem), anyBoolean())).thenReturn(searcher);
}
use of org.eclipse.che.api.vfs.search.Searcher in project che by eclipse.
the class MemoryLuceneSearcherProviderTest method resetsSearcherInProviderAfterClosingSearcher.
@Test
public void resetsSearcherInProviderAfterClosingSearcher() throws Exception {
VirtualFileSystem virtualFileSystem = mockVirtualFileSystem();
Searcher searcher = memoryLuceneSearcherProvider.getSearcher(virtualFileSystem, true);
assertNotNull(searcher);
searcher.close();
assertNull(memoryLuceneSearcherProvider.getSearcher(virtualFileSystem, false));
}
use of org.eclipse.che.api.vfs.search.Searcher in project che by eclipse.
the class MemoryVirtualFileTest method setUp.
@Before
public void setUp() throws Exception {
archiverFactory = mock(ArchiverFactory.class);
SearcherProvider searcherProvider = mock(SearcherProvider.class);
fileSystem = new MemoryVirtualFileSystem(archiverFactory, searcherProvider);
searcher = mock(Searcher.class);
when(searcherProvider.getSearcher(eq(fileSystem), eq(true))).thenReturn(searcher);
when(searcherProvider.getSearcher(eq(fileSystem))).thenReturn(searcher);
}
Aggregations