use of com.intellij.history.integration.revertion.Reverter in project intellij-community by JetBrains.
the class RecentChangeDialogTest method testRevertChange.
public void testRevertChange() throws IOException {
getVcs().beginChangeSet();
createChildData(myRoot, "f1.txt");
getVcs().endChangeSet("change");
getVcs().beginChangeSet();
createChildData(myRoot, "f2.txt");
getVcs().endChangeSet("another change");
RecentChange c = getVcs().getRecentChanges(getRootEntry()).get(1);
RecentChangeDialogModel m = new RecentChangeDialogModel(myProject, myGateway, getVcs(), c);
Reverter r = m.createReverter();
r.revert();
assertNull(myRoot.findChild("f1.txt"));
assertNotNull(myRoot.findChild("f2.txt"));
}
use of com.intellij.history.integration.revertion.Reverter in project intellij-community by JetBrains.
the class SelectionHistoryDialogTest method testRevert.
public void testRevert() throws IOException {
initModelOnSecondLineAndSelectRevisions(0, 0);
Reverter r = m.createReverter();
r.revert();
assertEquals("a\nbc\nc\ne\n", new String(f.contentsToByteArray()));
}
Aggregations