Search in sources :

Example 1 with InMemoryLocalHistoryFacade

use of com.intellij.history.core.InMemoryLocalHistoryFacade in project intellij-community by JetBrains.

the class RevisionsTest method testAfterRevisionForRootEntry.

@Test
public void testAfterRevisionForRootEntry() {
    RootEntry root = new RootEntry();
    LocalHistoryFacade facade = new InMemoryLocalHistoryFacade();
    ChangeSet cs = addChangeSet(facade, createFile(root, "f1"));
    addChangeSet(facade, createFile(root, "f2"));
    Revision r = new ChangeRevision(facade, root, "", cs, false);
    RootEntry e = (RootEntry) r.findEntry();
    assertEquals(e.getClass(), RootEntry.class);
    assertNotNull(e.findEntry("f1"));
    assertNull(e.findEntry("f2"));
}
Also used : RootEntry(com.intellij.history.core.tree.RootEntry) InMemoryLocalHistoryFacade(com.intellij.history.core.InMemoryLocalHistoryFacade) LocalHistoryFacade(com.intellij.history.core.LocalHistoryFacade) InMemoryLocalHistoryFacade(com.intellij.history.core.InMemoryLocalHistoryFacade) ChangeSet(com.intellij.history.core.changes.ChangeSet) Test(org.junit.Test)

Aggregations

InMemoryLocalHistoryFacade (com.intellij.history.core.InMemoryLocalHistoryFacade)1 LocalHistoryFacade (com.intellij.history.core.LocalHistoryFacade)1 ChangeSet (com.intellij.history.core.changes.ChangeSet)1 RootEntry (com.intellij.history.core.tree.RootEntry)1 Test (org.junit.Test)1