public Test_Loading_TM_Repos() { TM_Libraries_Folder = @"E:\TeamMentor\TM_Releases\TM_Libraries\3.4.1_Libs"; Assert.IsNotNull(TM_Libraries_Folder); Assert.IsTrue(TM_Libraries_Folder.dirExists()); Temp_Cloned_Repos = "_Temp_Clones".tempDir(false); Assert.IsNotNull(Temp_Cloned_Repos); GitHub_Repo_Path = "[email protected]:TMContent/Lib_{0}.git"; Assert.IsNotNull(GitHub_Repo_Path); GitExe_Path = "git.exe"; Assert.IsNotNull(GitExe_Path); var gitExecutionResult = gitExe_Execute("", ""); Assert.IsTrue(gitExecutionResult.starts("usage: git")); Skip_Online_Tests = false; Delete_Temp_Repos = true; Save_Git_Clone_Data = true; Open_Temp_Repo_Folder = true; if (Open_Temp_Repo_Folder) { Temp_Cloned_Repos.startProcess(); } }
//Git.exe public API_NGit gitExe_Local_Clone(string repoName) { "\n\n *** gitExe_Local_Clone ***\n\n".info(); var repo_Clone_Name = repoName.append("_GitExe_Local").add_RandomLetters(3); var repo_Source = TM_Libraries_Folder.pathCombine(repoName); return(gitExe_Clone(repo_Source, repo_Clone_Name)); }
//NGIT public API_NGit NGit_Local_Clone(string repoName) { "\n\n *** NGit_Local_Clone ***\n\n".info(); var repo_Source = TM_Libraries_Folder.pathCombine(repoName); var repo_Clone_Name = repoName.append("_NGit_Local_").add_RandomLetters(3); Assert.IsTrue(repo_Source.dirExists()); Assert.IsTrue(repo_Source.isGitRepository()); return(NGit_Clone(repo_Source, repo_Clone_Name)); }
// to delete public API_NGit local_Clone(string repoName) { var repo_Source = TM_Libraries_Folder.pathCombine(repoName); Assert.IsTrue(repo_Source.dirExists()); Assert.IsTrue(repo_Source.isGitRepository()); var repo_Clone = Temp_Cloned_Repos.pathCombine(repoName.add_RandomLetters(3)); Assert.IsFalse(repo_Clone.dirExists()); var nGit = repo_Source.git_Clone(repo_Clone); Assert.IsTrue(repo_Clone.dirExists()); Assert.IsNotNull(nGit); Assert.IsTrue(repo_Clone.isGitRepository()); Assert.IsTrue(nGit.commits_SHA1().notEmpty()); Assert.IsTrue(nGit.files().notEmpty()); return(nGit); }