예제 #1
0
        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);
        }
예제 #2
0
        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")));
        }
예제 #3
0
        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);
        }