public void FinishFeature()
        {
            var gf = new GitFlowWrapper(sampleRepoPath);

            gf.Init(new GitFlowRepoSettings());
            gf.StartFeature("X");
            gf.FinishFeature("X");
            using (var repo = new Repository(sampleRepoPath))
            {
                //Feature branch should be deleted (default option)
                Assert.IsFalse(repo.Branches.Any(b => !b.IsRemote && b.Name == "feature/X"));
            }
        }
        public void FinishFeatureShouldRemoveIt()
        {
            var gf = new GitFlowWrapper(sampleRepoPath);

            gf.Init(new GitFlowRepoSettings());
            gf.StartFeature("X");
            gf.StartFeature("Y");

            Assert.AreEqual(2, gf.AllFeatures.Count());

            gf.FinishFeature("X");

            Assert.AreEqual(1, gf.AllFeatures.Count());
        }
        public void FinishFeatureSquashChanges()
        {
            var gf = new GitFlowWrapper(sampleRepoPath);

            gf.Init(new GitFlowRepoSettings());
            gf.StartFeature("X");

            Assert.AreEqual(1, gf.AllFeatures.Count());

            gf.FinishFeature("X", squash: true);

            using (var repo = new Repository(sampleRepoPath))
            {
                Assert.IsTrue(repo.Branches.Any(b => !b.IsRemote && b.Name == "feature/X"));
            }
        }
Exemplo n.º 4
0
 public void FinishFeature()
 {
     var gf = new GitFlowWrapper(sampleRepoPath);
     gf.Init(new GitFlowRepoSettings());
     gf.StartFeature("X");
     gf.FinishFeature("X");
     using (var repo = new Repository(sampleRepoPath))
     {
         //Feature branch should be deleted (default option)
         Assert.IsFalse(repo.Branches.Any(b => !b.IsRemote && b.Name == "feature/X"));
     }
 }
Exemplo n.º 5
0
        public void FinishFeatureShouldRemoveIt()
        {
            var gf = new GitFlowWrapper(sampleRepoPath);
            gf.Init(new GitFlowRepoSettings());
            gf.StartFeature("X");
            gf.StartFeature("Y");

            Assert.AreEqual(2, gf.AllFeatures.Count());

            gf.FinishFeature("X");

            Assert.AreEqual(1, gf.AllFeatures.Count());
        }