コード例 #1
0
        public void HeatAnalyzerGetFilesForCommitTest()
        {
            using (var repo = new GitRepository(defaultRepo, "repoName"))
            {
                var ha = new HeatAnalyzer(repo);
                var commit = repo.GetCommits().First();
                var files = ha.GetFilesForCommit(commit);
                var modifiedFiles = ha.GetModifiedFilesForCommit(commit);
                Assert.IsNotNull(files);
                CollectionAssert.AllItemsAreUnique(files);
                Assert.IsNotNull(modifiedFiles);
                CollectionAssert.AllItemsAreUnique(modifiedFiles);

                repo.DeleteRepository();
            }
        }
コード例 #2
0
        public void RepoIsNotEmptyTest()
        {
            using (var repo = new GitRepository(defaultRepo, "repoName", copyIfNotLocal: true, branch: "master"))
            {
                StringAssert.Equals("master", repo.Branch);
                StringAssert.Equals(defaultRepo, repo.Url);
                Assert.IsTrue(repo.IsLocal);
                Assert.IsNotNull(repo.GetCommits());

                repo.DeleteRepository();
            }
        }