Package org.eclipse.egit.ui.common

Examples of org.eclipse.egit.ui.common.CommitDialogTester.commit()


    assertTrue("Wrong file",
        commitDialogTester.getEntryText(0).endsWith("test.txt"));
    commitDialogTester.setAuthor(TestUtil.TESTAUTHOR);
    commitDialogTester.setCommitter(TestUtil.TESTCOMMITTER);
    commitDialogTester.setCommitMessage("The new commit");
    commitDialogTester.commit();
    TestUtil.checkHeadCommit(lookupRepository(repositoryFile),
        TestUtil.TESTAUTHOR, TestUtil.TESTCOMMITTER, "The new commit");
    NoFilesToCommitPopup popup = CommitDialogTester
        .openCommitDialogExpectNoFilesToCommit(PROJ1);
    popup.cancelPopup();
View Full Code Here


    commitDialogTester.setCommitter(TestUtil.TESTCOMMITTER);
    String commitMessage = commitDialogTester.getCommitMessage();
    assertTrue(commitMessage.indexOf("Change-Id") > 0);
    String newCommitMessage = "Change to be amended \n\n" + commitMessage;
    commitDialogTester.setCommitMessage(newCommitMessage);
    commitDialogTester.commit();
    NoFilesToCommitPopup noFilesToCommitPopup = CommitDialogTester
        .openCommitDialogExpectNoFilesToCommit(PROJ1);
    repo.getConfig().setBoolean(ConfigConstants.CONFIG_GERRIT_SECTION,
        null, ConfigConstants.CONFIG_KEY_CREATECHANGEID, false);
    commitDialogTester = noFilesToCommitPopup.confirmPopup();
View Full Code Here

    assertTrue(commitDialogTester.getSignedOff());
    assertTrue(commitDialogTester.getInsertChangeId());
    // change commit message to get a different SHA1 for the commit
    commitDialogTester.setCommitMessage("Changed "
        + commitDialogTester.getCommitMessage());
    commitDialogTester.commit();
    RevCommit headCommit = TestUtil.getHeadCommit(repository);
    if(headCommitId.equals(headCommit.getId()))
      fail("There is no new commit");
    assertEquals(oldHeadCommit, headCommit.getParent(0));
  }
View Full Code Here

    commitDialogTester.setSignedOff(true);

    String commitMessage = commitDialogTester.getCommitMessage();
    assertTrue(commitMessage.indexOf("Change-Id") > 0);
    assertTrue(commitMessage.indexOf("Signed-off-by") > 0);
    commitDialogTester.commit();
  }

  @Test
  public void testAmend() throws Exception {
    Repository repository = lookupRepository(repositoryFile);
View Full Code Here

    assertTrue(commitDialogTester.getCommitMessage().indexOf("Change-Id") > 0);
    assertTrue(commitDialogTester.getCommitMessage().indexOf(
        "Signed-off-by") > 0);
    assertTrue(commitDialogTester.getSignedOff());
    assertTrue(commitDialogTester.getInsertChangeId());
    commitDialogTester.commit();
    headCommit = TestUtil.getHeadCommit(repository);
    if(headCommitId.equals(headCommit.getId()))
      fail("There is no new commit");
    assertEquals(oldHeadCommit, headCommit.getParent(0));
    assertTrue(headCommit.getFullMessage().indexOf(changeId) > 0);
View Full Code Here

      assertTrue(commitDialogTester.isEntryChecked(0));
      String path = RepositoryMapping.getMapping(file)
          .getRepoRelativePath(file);
      assertEquals(path, commitDialogTester.getEntryText(0));
      commitDialogTester.setCommitMessage("Add new file");
      commitDialogTester.commit();
      file.delete(false, null);
    } finally {
      Activator
          .getDefault()
          .getPreferenceStore()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.