예제 #1
0
        public void clone()
        {
            //git_Clonen();    // already triggers methods funcionality

            //test Exception handing
            var nGit = new API_NGit();

            Assert.IsNull(nGit.clone(null, null));
            Assert.IsInstanceOf <InvalidRemoteException>(nGit.Last_Exception);
            Assert.IsNull(nGit.clone(null, "".tempDir(false)));
        }
예제 #2
0
        public static API_NGit open_or_Clone(this API_NGit nGit, string sourceRepository, string targetFolder)
        {
            if (targetFolder.isGitRepository())
            {
                return(nGit.open(targetFolder));
            }

            return(nGit.clone(sourceRepository, targetFolder));
        }