Search in sources :

Example 1 with DirectoryChangeModel

use of com.intellij.history.integration.ui.models.DirectoryChangeModel in project intellij-community by JetBrains.

the class DirectoryChangeModelTest method testNames.

public void testNames() throws IOException {
    VirtualFile f = createDirectory("foo");
    rename(f, "bar");
    List<Revision> revs = getRevisionsFor(f);
    Difference d = new Difference(false, revs.get(0).findEntry(), revs.get(1).findEntry());
    DirectoryChangeModel m = createModelOn(d);
    assertEquals("bar", m.getEntryName(0));
    assertEquals("foo", m.getEntryName(1));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) Revision(com.intellij.history.core.revisions.Revision) DirectoryChangeModel(com.intellij.history.integration.ui.models.DirectoryChangeModel) Difference(com.intellij.history.core.revisions.Difference)

Example 2 with DirectoryChangeModel

use of com.intellij.history.integration.ui.models.DirectoryChangeModel in project intellij-community by JetBrains.

the class DirectoryChangeModelTest method testNamesForAbsentEntries.

public void testNamesForAbsentEntries() {
    Difference d = new Difference(false, null, null);
    DirectoryChangeModel m = createModelOn(d);
    assertEquals("", m.getEntryName(0));
    assertEquals("", m.getEntryName(1));
}
Also used : DirectoryChangeModel(com.intellij.history.integration.ui.models.DirectoryChangeModel) Difference(com.intellij.history.core.revisions.Difference)

Aggregations

Difference (com.intellij.history.core.revisions.Difference)2 DirectoryChangeModel (com.intellij.history.integration.ui.models.DirectoryChangeModel)2 Revision (com.intellij.history.core.revisions.Revision)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1