示例#1
0
 @Before
 public void setUp() throws Exception {
   super.setUp();
   repo = createWorkRepository();
   tr = new TestRepository<FileRepository>(repo, new RevWalk(repo), mockSystemReader);
   gc = new GC(repo);
 }
示例#2
0
 @Before
 public void setUp() throws Exception {
   super.setUp();
   db = createBareRepository();
   reader = db.newObjectReader();
   test = new TestRepository<Repository>(db);
 }
示例#3
0
  @Before
  public void setUp() throws Exception {
    super.setUp();

    db = createBareRepository();
    service = new AsIsFileService();
  }
  @Override
  @Before
  public void setUp() throws Exception {
    super.setUp();

    src = createBareRepository();
    dst = createBareRepository();

    // Fill dst with a some common history.
    //
    TestRepository<Repository> d = new TestRepository<Repository>(dst);
    a = d.blob("a");
    A = d.commit(d.tree(d.file("a", a)));
    B = d.commit().parent(A).create();
    d.update(R_MASTER, B);

    // Clone from dst into src
    //
    Transport t = Transport.open(src, uriOf(dst));
    try {
      t.fetch(PM, Collections.singleton(new RefSpec("+refs/*:refs/*")));
      assertEquals(B, src.resolve(R_MASTER));
    } finally {
      t.close();
    }

    // Now put private stuff into dst.
    //
    b = d.blob("b");
    P = d.commit(d.tree(d.file("b", b)), A);
    d.update(R_PRIVATE, P);
  }
 @Override
 @After
 public void tearDown() throws Exception {
   if (src != null) src.close();
   if (dst != null) dst.close();
   super.tearDown();
 }
示例#6
0
 @After
 public void tearDown() throws Exception {
   super.tearDown();
 }
示例#7
0
 @Override
 @Before
 public void setUp() throws Exception {
   super.setUp();
   db = createWorkRepository();
 }