Package org.eclipse.egit.core.test

Examples of org.eclipse.egit.core.test.TestRepository


  @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());
  }
View Full Code Here


  private IFile changedFile;

  @Before
  public void setUp() throws Exception {
    super.setUp();
    testRepo = new TestRepository(gitDir);
    testRepo.connect(project.getProject());

    String fileName = "Main.java";
    File file = testRepo.createFile(project.getProject(), fileName);
    initialCommit = testRepo.appendContentAndCommit(project.getProject(),
View Full Code Here

  @Before
  public void setUp() throws Exception {

    workdir = testUtils.createTempDir("Repository1");

    repository1 = new TestRepository(new File(workdir, Constants.DOT_GIT));

    // now we create a project in repo1
    project = testUtils
        .createProjectInLocalFileSystem(workdir, projectName);
    testUtils.addFileToProject(project, "folder1/file1.txt", "Hello world 1");
    testUtils.addFileToProject(project, "folder1/file2.txt", "Hello world 2");

    repository1.connect(project);
    repository1.trackAllFiles(project);
    repository1.commit("Initial commit");

    File workdir2 = testUtils.createTempDir("Project2");
    // Project location is at root of repository
    project2 = testUtils.createProjectInLocalFileSystem(workdir2.getParentFile(), "Project2");
    testUtils.addFileToProject(project2, "file.txt", "initial");
    repository2 = new TestRepository(new File(workdir2, Constants.DOT_GIT));
    repository2.connect(project2);
    repository2.trackAllFiles(project2);
    repository2.commit("Initial commit");
  }
View Full Code Here

  @Before
  public void setUp() throws Exception {

    workdir = testUtils.createTempDir("Repository1");

    repository1 = new TestRepository(new File(workdir, Constants.DOT_GIT));

    // now we create a project in repo1
    project = testUtils
        .createProjectInLocalFileSystem(workdir, projectName);
    testUtils.addFileToProject(project, "folder1/file1.txt", "Hello world");
View Full Code Here

  @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");
    firstCommit = testRepository.addAndCommit(project.getProject(), file,
View Full Code Here

  @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", "junit@jgit.org")
        .setMessage("Initall commit").call();
View Full Code Here

  @Before
  public void setUp() throws Exception {

    workdir = testUtils.createTempDir("Repository1");

    repository1 = new TestRepository(new File(workdir, Constants.DOT_GIT));
    project = testUtils.createProjectInLocalFileSystem(workdir, projectName);
    repository1.connect(project);
  }
View Full Code Here

  @Before
  public void setUp() throws Exception {
    workdir = testUtils.createTempDir("Repository1");
    workdir2 = testUtils.createTempDir("Repository2");

    repository1 = new TestRepository(new File(workdir, Constants.DOT_GIT));

    File file = new File(workdir, "file1.txt");
    FileUtils.createNewFile(file);
    Git git = new Git(repository1.getRepository());
    git.add().addFilepattern("file1.txt").call();
View Full Code Here

  @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");
    commit = testRepository.addAndCommit(project.getProject(), file,
View Full Code Here

  IFile fileInIndex;

  @Before
  public void setUp() throws Exception {
    super.setUp();
    testRepository = new TestRepository(gitDir);
    repository = testRepository.getRepository();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.test.TestRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.