Search in sources :

Example 1 with ArchiverFactory

use of org.eclipse.che.api.vfs.ArchiverFactory in project che by eclipse.

the class LocalVirtualFileTest method setUp.

@Before
public void setUp() throws Exception {
    File targetDir = new File(Thread.currentThread().getContextClassLoader().getResource(".").getPath()).getParentFile();
    testDirectory = new File(targetDir, NameGenerator.generate("fs-", 4));
    assertTrue(testDirectory.mkdir());
    assertionHelper = new LocalVirtualFileAssertionHelper(testDirectory);
    archiverFactory = mock(ArchiverFactory.class);
    SearcherProvider searcherProvider = mock(SearcherProvider.class);
    fileSystem = new LocalVirtualFileSystem(testDirectory, archiverFactory, searcherProvider, mock(AbstractVirtualFileSystemProvider.CloseCallback.class));
    searcher = mock(Searcher.class);
    when(searcherProvider.getSearcher(eq(fileSystem), eq(true))).thenReturn(searcher);
    when(searcherProvider.getSearcher(eq(fileSystem))).thenReturn(searcher);
}
Also used : Searcher(org.eclipse.che.api.vfs.search.Searcher) ArchiverFactory(org.eclipse.che.api.vfs.ArchiverFactory) VirtualFile(org.eclipse.che.api.vfs.VirtualFile) File(java.io.File) SearcherProvider(org.eclipse.che.api.vfs.search.SearcherProvider) AbstractVirtualFileSystemProvider(org.eclipse.che.api.vfs.AbstractVirtualFileSystemProvider) Before(org.junit.Before)

Example 2 with ArchiverFactory

use of org.eclipse.che.api.vfs.ArchiverFactory 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);
}
Also used : Searcher(org.eclipse.che.api.vfs.search.Searcher) ArchiverFactory(org.eclipse.che.api.vfs.ArchiverFactory) SearcherProvider(org.eclipse.che.api.vfs.search.SearcherProvider) Before(org.junit.Before)

Aggregations

ArchiverFactory (org.eclipse.che.api.vfs.ArchiverFactory)2 Searcher (org.eclipse.che.api.vfs.search.Searcher)2 SearcherProvider (org.eclipse.che.api.vfs.search.SearcherProvider)2 Before (org.junit.Before)2 File (java.io.File)1 AbstractVirtualFileSystemProvider (org.eclipse.che.api.vfs.AbstractVirtualFileSystemProvider)1 VirtualFile (org.eclipse.che.api.vfs.VirtualFile)1