use of com.intellij.openapi.vfs.ex.temp.TempFileSystem in project intellij-community by JetBrains.
the class PyResolveTestCase method assertResolveResult.
public static <T extends PsiElement> T assertResolveResult(PsiElement element, Class<T> aClass, String name, @Nullable String containingFilePath) {
assertInstanceOf(element, aClass);
assertEquals(name, ((PsiNamedElement) element).getName());
if (containingFilePath != null) {
VirtualFile virtualFile = element.getContainingFile().getVirtualFile();
if (virtualFile.getFileSystem() instanceof TempFileSystem) {
assertEquals(containingFilePath, virtualFile.getPath());
} else {
assertEquals(containingFilePath, virtualFile.getName());
}
}
return (T) element;
}
use of com.intellij.openapi.vfs.ex.temp.TempFileSystem in project intellij-community by JetBrains.
the class PersistentFsTest method testLocalRoots.
public void testLocalRoots() {
VirtualFile tempRoot = VirtualFileManager.getInstance().findFileByUrl("temp:///");
assertNotNull(tempRoot);
VirtualFile[] roots = myFs.getLocalRoots();
for (VirtualFile root : roots) {
assertTrue("root=" + root, root.isInLocalFileSystem());
VirtualFileSystem fs = root.getFileSystem();
assertTrue("fs=" + fs, fs instanceof LocalFileSystem);
assertFalse("fs=" + fs, fs instanceof TempFileSystem);
}
}
Aggregations