use of org.eclipse.che.api.vfs.impl.file.LocalVirtualFileSystem in project che by eclipse.
the class ZipArchiverTest 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());
SearcherProvider searcherProvider = mock(SearcherProvider.class);
Searcher searcher = mock(Searcher.class);
VirtualFileSystem virtualFileSystem = new LocalVirtualFileSystem(testDirectory, mock(ArchiverFactory.class), searcherProvider, mock(AbstractVirtualFileSystemProvider.CloseCallback.class));
when(searcherProvider.getSearcher(eq(virtualFileSystem), eq(true))).thenReturn(searcher);
when(searcherProvider.getSearcher(eq(virtualFileSystem))).thenReturn(searcher);
vfsRoot = virtualFileSystem.getRoot();
}
use of org.eclipse.che.api.vfs.impl.file.LocalVirtualFileSystem in project che by eclipse.
the class TarArchiverTest 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());
SearcherProvider searcherProvider = mock(SearcherProvider.class);
Searcher searcher = mock(Searcher.class);
VirtualFileSystem virtualFileSystem = new LocalVirtualFileSystem(testDirectory, mock(ArchiverFactory.class), searcherProvider, mock(AbstractVirtualFileSystemProvider.CloseCallback.class));
when(searcherProvider.getSearcher(eq(virtualFileSystem), eq(true))).thenReturn(searcher);
when(searcherProvider.getSearcher(eq(virtualFileSystem))).thenReturn(searcher);
vfsRoot = virtualFileSystem.getRoot();
}
Aggregations