Package org.eclipse.egit.ui.internal.commit

Examples of org.eclipse.egit.ui.internal.commit.CommitEditorInput


  @Test
  public void shouldPersistAndRestoreCommit() {
    RepositoryCommit repositoryCommit = new RepositoryCommit(
        repository, commit);

    new CommitEditorInput(repositoryCommit).saveState(memento);
    IAdaptable restored = new CommitEditorInputFactory()
        .createElement(memento);

    assertNotNull(restored);
    assertThat(restored, instanceOf(CommitEditorInput.class));
View Full Code Here


  public void shouldPersistAndRestoreStashCommit() {
    RepositoryCommit stashCommit = new RepositoryCommit(
        repository, commit);
    stashCommit.setStash(true);

    new CommitEditorInput(stashCommit).saveState(memento);
    IAdaptable restored = new CommitEditorInputFactory()
        .createElement(memento);

    assertNotNull(restored);
    assertThat(restored, instanceOf(CommitEditorInput.class));
View Full Code Here

  }

  @Test
  public void testConstructorAsserts() {
    try {
      assertNull(new CommitEditorInput(null));
    } catch (AssertionFailedException afe) {
      assertNotNull(afe);
    }
  }
View Full Code Here

  }

  @Test
  public void testAdapters() {
    RepositoryCommit repoCommit = new RepositoryCommit(repository, commit);
    CommitEditorInput input = new CommitEditorInput(repoCommit);
    assertEquals(repoCommit, input.getAdapter(RepositoryCommit.class));
    assertEquals(repository, input.getAdapter(Repository.class));
    assertEquals(commit, input.getAdapter(RevCommit.class));
  }
View Full Code Here

  }

  @Test
  public void testInput() {
    RepositoryCommit repoCommit = new RepositoryCommit(repository, commit);
    CommitEditorInput input = new CommitEditorInput(repoCommit);
    assertNotNull(input.getImageDescriptor());
    assertNotNull(input.getToolTipText());
    assertNotNull(input.getName());
    assertEquals(repoCommit, input.getCommit());
    assertNotNull(input.getPersistable());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.ui.internal.commit.CommitEditorInput

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.