public void CanLookupSameObjectTwiceAndTheyAreEqual() { using (var repo = new Repository(BareTestRepoPath)) { GitObject commit = repo.Lookup(commitSha); GitObject commit2 = repo.Lookup(commitSha); Assert.True(commit.Equals(commit2)); Assert.Equal(commit2.GetHashCode(), commit.GetHashCode()); } }
public void CanLookupSameObjectTwiceAndTheyAreEqual() { using (var repo = new Repository(Constants.BareTestRepoPath)) { GitObject commit = repo.Lookup(commitSha); GitObject commit2 = repo.Lookup(commitSha); commit.Equals(commit2).ShouldBeTrue(); commit.GetHashCode().ShouldEqual(commit2.GetHashCode()); } }