Search in sources :

Example 1 with MockSystemReader

use of org.eclipse.jgit.junit.MockSystemReader in project gitiles by GerritCodeReview.

the class ServletTest method setUp.

@Before
public void setUp() throws Exception {
    MockSystemReader mockSystemReader = new MockSystemReader();
    SystemReader.setInstance(mockSystemReader);
    DfsRepository r = new InMemoryRepository(new DfsRepositoryDescription("repo"));
    repo = new TestRepository<>(r, new RevWalk(r), mockSystemReader);
    servlet = TestGitilesServlet.create(repo);
}
Also used : DfsRepository(org.eclipse.jgit.internal.storage.dfs.DfsRepository) InMemoryRepository(org.eclipse.jgit.internal.storage.dfs.InMemoryRepository) MockSystemReader(org.eclipse.jgit.junit.MockSystemReader) RevWalk(org.eclipse.jgit.revwalk.RevWalk) DfsRepositoryDescription(org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription) Before(org.junit.Before)

Aggregations

DfsRepository (org.eclipse.jgit.internal.storage.dfs.DfsRepository)1 DfsRepositoryDescription (org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription)1 InMemoryRepository (org.eclipse.jgit.internal.storage.dfs.InMemoryRepository)1 MockSystemReader (org.eclipse.jgit.junit.MockSystemReader)1 RevWalk (org.eclipse.jgit.revwalk.RevWalk)1 Before (org.junit.Before)1