Search in sources :

Example 21 with RootEntry

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

the class StreamTest method testROStatusChange.

@Test
public void testROStatusChange() throws IOException {
    Entry root = new RootEntry();
    Change c = new ROStatusChange(nextId(), "f", true);
    StreamUtil.writeChange(os, c);
    Change read = StreamUtil.readChange(is);
    assertEquals(ROStatusChange.class, read.getClass());
    ROStatusChange result = ((ROStatusChange) read);
    assertEquals("f", result.getPath());
    assertEquals(true, result.getOldStatus());
}
Also used : DirectoryEntry(com.intellij.history.core.tree.DirectoryEntry) Entry(com.intellij.history.core.tree.Entry) RootEntry(com.intellij.history.core.tree.RootEntry) FileEntry(com.intellij.history.core.tree.FileEntry) RootEntry(com.intellij.history.core.tree.RootEntry) Test(org.junit.Test)

Example 22 with RootEntry

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

the class SelectionCalculatorTest method createRevisions.

private List<Revision> createRevisions(String... contents) {
    RootEntry r = new RootEntry();
    vcs.addChangeInTests(createFile(r, "f", contents[0], -1, false));
    for (int i = 1; i < contents.length; i++) {
        vcs.addChangeInTests(changeContent(r, "f", contents[i], i));
    }
    return collectRevisions(vcs, r, "f", null, null);
}
Also used : RootEntry(com.intellij.history.core.tree.RootEntry)

Aggregations

RootEntry (com.intellij.history.core.tree.RootEntry)22 Entry (com.intellij.history.core.tree.Entry)13 FileEntry (com.intellij.history.core.tree.FileEntry)6 Test (org.junit.Test)6 NotNull (org.jetbrains.annotations.NotNull)2 ByteContent (com.intellij.history.ByteContent)1 InMemoryLocalHistoryFacade (com.intellij.history.core.InMemoryLocalHistoryFacade)1 LocalHistoryFacade (com.intellij.history.core.LocalHistoryFacade)1 ChangeSet (com.intellij.history.core.changes.ChangeSet)1 DirectoryEntry (com.intellij.history.core.tree.DirectoryEntry)1