コード例 #1
0
 @After
 public void clearGitResources() throws Exception {
   testRepo.disconnect(iProject);
   testRepo.dispose();
   repo = null;
   super.tearDown();
 }
コード例 #2
0
 @Before
 public void setUp() throws Exception {
   super.setUp();
   gitDir = new File(project.getProject().getLocationURI().getPath(), Constants.DOT_GIT);
   testRepository = new TestRepository(gitDir);
   repository = testRepository.getRepository();
   testRepository.connect(project.getProject());
   testRepository.commit("initial commit");
 }
コード例 #3
0
  @Before
  public void setUp() throws Exception {
    super.setUp();

    TestRepository testRepo = new TestRepository(gitDir);
    testRepo.connect(project.project);
    repo = RepositoryMapping.getMapping(project.project).getRepository();

    // make initial commit
    new Git(repo).commit().setAuthor("JUnit", "*****@*****.**").setMessage("Initall commit").call();
  }
コード例 #4
0
  @Before
  public void setUp() throws Exception {
    super.setUp();
    gitDir = new File(project.getProject().getLocationURI().getPath(), Constants.DOT_GIT);
    testRepository = new TestRepository(gitDir);
    testRepository.connect(project.getProject());
    testRepository.createInitialCommit("initial");

    File file = testRepository.createFile(project.getProject(), "file-1");
    commit1 = testRepository.addAndCommit(project.getProject(), file, "commit 1");
    testRepository.appendFileContent(file, "file-2");
    commit2 = testRepository.addAndCommit(project.getProject(), file, "commit 2");
    testRepository.appendFileContent(file, "file-3");
    commit3 = testRepository.addAndCommit(project.getProject(), file, "commit 3");
  }
コード例 #5
0
 @After
 public void tearDown() throws Exception {
   testRepository.dispose();
   super.tearDown();
 }