Beispiel #1
0
        private static void AssertEnumerationOfCommitsInRepo(Repository repo, Func <Repository, Filter> filterBuilder, IEnumerable <string> abbrevIds)
        {
            ICommitCollection commits = repo.Commits.QueryBy(filterBuilder(repo));

            IEnumerable <string> commitShas = commits.Select(c => c.Id.ToString(7)).ToArray();

            Assert.Equal(abbrevIds, commitShas);
        }
Beispiel #2
0
        private static void AssertEnumerationOfCommits(Func <Repository, Filter> filterBuilder, IEnumerable <string> abbrevIds)
        {
            using (var repo = new Repository(Constants.BareTestRepoPath))
            {
                ICommitCollection commits = repo.Commits.QueryBy(filterBuilder(repo));

                IEnumerable <string> commitShas = commits.Select(c => c.Id.ToString(7)).ToArray();

                CollectionAssert.AreEqual(abbrevIds, commitShas);
            }
        }