use of org.eclipse.xtext.ui.refactoring.impl.DefaultRefactoringDocumentProvider.FileDocument in project xtext-eclipse by eclipse.
the class RefactoringDocumentProviderTest method testFileDocument.
@Test
public void testFileDocument() throws Exception {
IRefactoringDocument document = createAndCheckDocument(testFile);
assertTrue(document instanceof FileDocument);
assertEquals(testFile, ((FileDocument) document).getFile());
assertEquals(TEST_FILE_CONTENT, document.getOriginalContents());
Change change = document.createChange(CHANGE_NAME, textEdit);
assertTrue(change instanceof TextFileChange);
assertEquals(CHANGE_NAME, change.getName());
Change undoChange = checkEdit(document, textEdit);
assertNotNull(undoChange);
}
Aggregations