use of com.google.gerrit.testing.InMemoryRepositoryManager in project gerrit by GerritCodeReview.
the class CodeReviewCommitTest method createCommit.
private ObjectId createCommit() throws Exception {
InMemoryRepositoryManager repoManager = new InMemoryRepositoryManager();
Project.NameKey project = Project.nameKey("test");
try (Repository repo = repoManager.createRepository(project);
TestRepository<Repository> tr = new TestRepository<>(repo)) {
PersonIdent ident = new PersonIdent(new PersonIdent("Test Ident", "test@test.com"));
return tr.commit().author(ident).committer(ident).message("Test commit").create();
}
}
use of com.google.gerrit.testing.InMemoryRepositoryManager in project gerrit by GerritCodeReview.
the class StalenessCheckerTest method setUp.
@Before
public void setUp() throws Exception {
repoManager = new InMemoryRepositoryManager();
r1 = repoManager.createRepository(P1);
tr1 = new TestRepository<>(r1);
r2 = repoManager.createRepository(P2);
tr2 = new TestRepository<>(r2);
}
Aggregations