コード例 #1
0
        public void HeatAnalyzerRepoTest()
        {
            using (var repo = new GitRepository(defaultRepo, "repoName"))
            {
                var ha = new HeatAnalyzer(repo);
                Assert.IsNotNull(ha);

                repo.DeleteRepository();
            }
        }
コード例 #2
0
        public void HeatAnalyzerGetUsersTest()
        {
            using (var repo = new GitRepository(defaultRepo, "repoName"))
            {
                var ha = new HeatAnalyzer(repo);
                var users = ha.GetUsers();
                Assert.IsNotNull(users);
                CollectionAssert.AllItemsAreUnique(users);

                repo.DeleteRepository();
            }
        }
コード例 #3
0
        public void HeatAnalyzerGetCommitsForUserTest()
        {
            using (var repo = new GitRepository(defaultRepo, "repoName"))
            {
                var ha = new HeatAnalyzer(repo);
                var userCommits = ha.GetUserCommits("Maksym Chernenko");
                Assert.IsNotNull(userCommits);
                CollectionAssert.AllItemsAreUnique(userCommits);

                repo.DeleteRepository();
            }
        }
コード例 #4
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();
            }
        }
コード例 #5
0
 public void RoslynTest()
 {
     using (var repo = new GitRepository(roslynRepo, "roslyn"))
     {
         //repo.GetLatestChanges();
         var ha = new HeatAnalyzer(repo);
         var users = ha.GetUsers();
         Assert.IsNotNull(users);
         var userCommits = ha.GetUserCommits(users.First().Name);
         Assert.IsNotNull(userCommits);
         CollectionAssert.AllItemsAreUnique(userCommits);
         repo.DeleteRepository();
     }
 }
コード例 #6
0
 public void HeatAnalyzerNullTest()
 {
     var ha = new HeatAnalyzer(null);
 }