private string CloneTestRepository(string sourceRepositoryPath, bool bare = false) { var wrapper = new Git.GitWrapper(); var targetId = _testId + "." + _repoId++; var cloneTask = wrapper.Clone(sourceRepositoryPath, targetId, bare); Assert.True(cloneTask.Result.Success); _tempList.Add(targetId); return(targetId); }
public void CanCloneFromGithub() { var wrapper = new Git.GitWrapper(); var cloneTask = wrapper.Clone("https://github.com/kal/semlove.git", _testId); var cloneResult = cloneTask.Result; Assert.True(cloneResult.Success); Assert.True(Directory.Exists(_testId)); Assert.True(Directory.Exists(Path.Combine(_testId, ".git"))); Assert.True(File.Exists(Path.Combine(_testId, "README.MD"))); }
public void CanCloneAnEmptyRepository() { var wrapper = new Git.GitWrapper(); var cloneTask = wrapper.Clone(_fixture.EmptyRepositoryPath, _testId); var cloneResult = cloneTask.Result; Assert.True(cloneResult.Success); Assert.True(Directory.Exists(_testId)); Assert.True(Directory.Exists(Path.Combine(_testId, ".git"))); _tempList.Add(_testId); }