示例#1
0
 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());
     }
 }
示例#2
0
 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());
     }
 }