Package org.eclipse.egit.core.synchronize.GitCommitsModelCache

Examples of org.eclipse.egit.core.synchronize.GitCommitsModelCache.Change


  }

  @Test
  public void shouldNotBeEqualWhenObjectIdsAreDifferent() {
    // given
    Change c1 = new Change();
    Change c2 = new Change();
    c1.objectId = ZERO_ID;
    c2.objectId = MISC_ID;

    // when
    boolean result = c1.equals(c2);

    // then
    assertFalse(result);
    assertFalse(c1.hashCode() == c2.hashCode());
  }
View Full Code Here


  }

  @Test
  public void shouldNotBeEqualWhenOneRemoteObjectIsNull() {
    // given
    Change c1 = new Change();
    Change c2 = new Change();
    c1.objectId = c2.commitId = ZERO_ID;
    c1.remoteObjectId = MISC_ID;

    // when
    boolean result = c1.equals(c2);

    // then
    assertFalse(result);
    assertFalse(c1.hashCode() == c2.hashCode());
  }
View Full Code Here

        .addConfiguredRepository(leftRepoFile);
  }

  private GitModelCacheFile createCacheFile(ObjectId repoId,
      ObjectId cacheId, IPath location) throws Exception {
    Change change = mock(Change.class);
    when(change.getObjectId()).thenReturn(
        AbbreviatedObjectId.fromObjectId(cacheId));
    when(change.getRemoteObjectId()).thenReturn(
        AbbreviatedObjectId.fromObjectId(repoId));

    return new GitModelCacheFile(createModelCommit(),
        lookupRepository(leftRepoFile), change, location);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.synchronize.GitCommitsModelCache.Change

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.