use of com.intellij.mock.MockDocument in project intellij-community by JetBrains.
the class PsiDocumentManagerImplTest method testGetCachedPsiFile_NoFile.
public void testGetCachedPsiFile_NoFile() throws Exception {
final PsiFile file = getPsiDocumentManager().getCachedPsiFile(new MockDocument());
assertNull(file);
}
use of com.intellij.mock.MockDocument in project intellij-community by JetBrains.
the class PsiDocumentManagerImplTest method testGetPsiFile_NotRegisteredDocument.
public void testGetPsiFile_NotRegisteredDocument() throws Exception {
final PsiFile file = getPsiDocumentManager().getPsiFile(new MockDocument());
assertNull(file);
}
use of com.intellij.mock.MockDocument in project intellij-community by JetBrains.
the class PsiDocumentManagerImplTest method testGetUncommittedDocuments_documentNotRegistered.
public void testGetUncommittedDocuments_documentNotRegistered() throws Exception {
final Document document = new MockDocument();
WriteCommandAction.runWriteCommandAction(null, () -> changeDocument(document, getPsiDocumentManager()));
assertEquals(0, getPsiDocumentManager().getUncommittedDocuments().length);
}
Aggregations