use of com.intellij.history.integration.ui.views.DirectoryChange in project intellij-community by JetBrains.
the class DirectoryHistoryDialogTest method testSelectionRevertion.
public void testSelectionRevertion() throws Exception {
createChildData(myRoot, "f1.txt");
createChildData(myRoot, "f2.txt");
DirectoryHistoryDialogModel m = createModelAndSelectRevision(1);
DirectoryChange c = (DirectoryChange) m.getChanges().get(0);
m.createRevisionReverter(Collections.singletonList(c.getDifference())).revert();
assertNull(myRoot.findChild("f1.txt"));
assertNotNull(myRoot.findChild("f2.txt"));
}
use of com.intellij.history.integration.ui.views.DirectoryChange in project intellij-community by JetBrains.
the class DirectoryHistoryDialogModelTest method testDifference.
public void testDifference() throws IOException {
VirtualFile dir = createDirectory("dir");
createFile("dir/file.txt");
initModelFor(dir);
assertEquals(2, m.getRevisions().size());
m.selectRevisions(1, 1);
List<Change> cc = m.getChanges();
assertEquals(2, cc.size());
assertEquals("dir", ((DirectoryChange) cc.get(0)).getModel().getEntryName(1));
assertEquals("file.txt", ((DirectoryChange) cc.get(1)).getModel().getEntryName(1));
}
Aggregations