//[Fact]
        public void ShouldGetModifications()
        {
            var git = new Git();

            var modifications = git.CompareTrees();

            Assert.NotNull(modifications);
        }
 internal DevelopmentEnvironmentCreationService(ISettings settings, string version, string branch, string taskBranchName)
 {
     _branch = branch;
     _version = version;
     _taskBranchName = taskBranchName;
     _settings = settings;
     _git = new Git(_settings);
 }
        //[Fact]
        public void ShouldGetCommits()
        {
            var git = new Git();
            var commits = git.GetCommits();

            var log = string.Join(Environment.NewLine, commits.Select(p => string.Format("{0} | {1}{2} {3}", p.Author, p.Message, Environment.NewLine, p.Changes)));

            Assert.NotNull(log);
        }
        //[Fact]
        public void ShouldGetMasterCommits()
        {
            var git = new Git();

            var commits = git.GetMasterCommits();

            var commitsString = string.Join(Environment.NewLine,
                commits
                .Where(p => !p.Message.StartsWith("Merge branch") && !p.Message.StartsWith("Merge commit"))
                .Select(p => string.Format("{0}{1}{2}", p.Author, Environment.NewLine, p.Message))
                .ToArray());

            Assert.NotNull(commitsString);
        }
Exemplo n.º 5
0
 public BranchCleaningService(Git git)
 {
     _git = git;
 }
Exemplo n.º 6
0
 private void UpdateTitle()
 {
     var git = new Git(_settings);
     this.Text = "Stag - " + git.GetCurrentBranch().Name;
 }