public void ShouldThrowExceptionForFatalError()
 {
     using (var repo = new TemporaryFolder())
     {
         var executor = new GitCommandExecutor(repo.Path);
         Assert.Throws <ApplicationException>(() => executor.Execute("bad command"));
     }
 }
        public void ShouldGitInit()
        {
            using (var repo = new TemporaryFolder())
            {
                var executor = new GitCommandExecutor(repo.Path);
                executor.Execute("init");

                var expectedGitFolderPath = Path.Combine(repo.Path, ".git");
                Assert.IsTrue(Directory.Exists(expectedGitFolderPath));
            }
        }
예제 #3
0
 public string RunCommand(string command)
 {
     return(_executor.Execute(command));
 }