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))); }
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)); }