当前位置: 首页>>代码示例>>C#>>正文


C# Repository.Flow方法代码示例

本文整理汇总了C#中LibGit2Sharp.Repository.Flow方法的典型用法代码示例。如果您正苦于以下问题:C# Repository.Flow方法的具体用法?C# Repository.Flow怎么用?C# Repository.Flow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LibGit2Sharp.Repository的用法示例。


在下文中一共展示了Repository.Flow方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init_FlowIsInitialized

 public void Init_FlowIsInitialized()
 {
     using (_testRepository = new Repository(_testPath))
     {
         _testRepository.Flow().Init(new GitFlowRepoSettings(), author);
         Assert.True(_testRepository.Flow().IsInitialized());
     }
 }
开发者ID:jzoss,项目名称:libgitflow2sharp,代码行数:8,代码来源:InitTests.cs

示例2: Feature_StartNewFeatureCreatesNewBranch

        public void Feature_StartNewFeatureCreatesNewBranch()
        {
            using (_testRepository = new Repository(_testPath))
            {
                var fullBranchname = _testRepository.Flow().GetPrefixByBranch(GitFlowSetting.Feature) + "testFeature";
                var newBranch = _testRepository.Branches[fullBranchname];
                if (newBranch != null)
                    TestHelpers.DeleteBranch(_testRepository, newBranch);

                Assert.Null(_testRepository.Branches[fullBranchname]);
                var info = _testRepository.Flow().StartNewFeature("testFeature");
                Assert.NotNull(info);
                newBranch = _testRepository.Branches[fullBranchname];
                Assert.NotNull(newBranch);
                //TestHelpers.DeleteBranch(_testRepository,newBranch);
            }
        }
开发者ID:jzoss,项目名称:libgitflow2sharp,代码行数:17,代码来源:FeatureTests.cs

示例3: Feature_PublishFeatureCreatesRemote

        public void Feature_PublishFeatureCreatesRemote()
        {
            using (_testRepository = new Repository(_testPath))
            {
                string branchName = TestHelpers.RandomString(8);
                var fullBranchname = _testRepository.Flow().GetPrefixByBranch(GitFlowSetting.Feature) + branchName;
                var newBranch = _testRepository.Branches[fullBranchname];
                if (newBranch != null)
                    TestHelpers.DeleteBranch(_testRepository, newBranch);

                var info = _testRepository.Flow().StartNewFeature(branchName);
                Assert.False(_testRepository.Branches[fullBranchname].IsTracking);
                _testRepository.Flow().PublishFeature(branchName);
                Assert.True(_testRepository.Branches[fullBranchname].IsTracking);
                //TestHelpers.DeleteBranch(_testRepository,newBranch);
            }
        }
开发者ID:jzoss,项目名称:libgitflow2sharp,代码行数:17,代码来源:FeatureTests.cs

示例4: Init_FlowSetsConfigToDefaultValues

        public void Init_FlowSetsConfigToDefaultValues()
        {
            using (_testRepository = new Repository(_testPath))
            {
                _testRepository.Flow().Init(new GitFlowRepoSettings(), author);

                //TODO Finish
                Assert.Equal(
                    _testRepository.Flow().GetPrefixByBranch(GitFlowSetting.Master),
                    GitFlowSetting.Master.GetAttribute<GitFlowConfigAttribute>().DefaultValue
                    );
                Assert.Equal(
                    _testRepository.Flow().GetPrefixByBranch(GitFlowSetting.Develop),
                    GitFlowSetting.Develop.GetAttribute<GitFlowConfigAttribute>().DefaultValue
                    );
            }
        }
开发者ID:jzoss,项目名称:libgitflow2sharp,代码行数:17,代码来源:InitTests.cs

示例5: Init_EmptyFlowCreatesBranches

 public void Init_EmptyFlowCreatesBranches()
 {
     using (_testRepository = new Repository(_testPath))
     {
         _testRepository.Flow().Init(new GitFlowRepoSettings(), author);
         Assert.Equal(_testRepository.Branches.Count(), 2);
         Assert.NotNull(_testRepository.Branches.FirstOrDefault(
                 x => string.Equals(x.FriendlyName, GitFlowSetting.Master.GetAttribute<GitFlowConfigAttribute>().DefaultValue, StringComparison.OrdinalIgnoreCase)));
         Assert.NotNull(_testRepository.Branches.FirstOrDefault(
                 x => string.Equals(x.FriendlyName, GitFlowSetting.Develop.GetAttribute<GitFlowConfigAttribute>().DefaultValue, StringComparison.OrdinalIgnoreCase)));
     }
 }
开发者ID:jzoss,项目名称:libgitflow2sharp,代码行数:12,代码来源:InitTests.cs

示例6: Init_FlowWithExistingBranches

 public void Init_FlowWithExistingBranches(string masterBranch, string devBranch)
 {
     using (_testRepository = new Repository(_testPath))
     {
         var settings = new GitFlowRepoSettings();
         Signature committer = author;
         var opts = new CommitOptions { AllowEmptyCommit = true };
         _testRepository.Commit("Initial commit", author, committer, opts);
         TestHelpers.CreateLocalTestBranch(_testRepository, masterBranch, GitFlowSetting.Master, settings);
         TestHelpers.CreateLocalTestBranch(_testRepository, devBranch, GitFlowSetting.Develop, settings);
         _testRepository.Flow().Init(settings, author);
         Assert.NotNull(_testRepository.Branches.FirstOrDefault(
                 x => string.Equals(x.FriendlyName, settings.GetSetting(GitFlowSetting.Master), StringComparison.OrdinalIgnoreCase)));
         Assert.NotNull(_testRepository.Branches.FirstOrDefault(
                 x => string.Equals(x.FriendlyName, settings.GetSetting(GitFlowSetting.Develop), StringComparison.OrdinalIgnoreCase)));
     }
 }
开发者ID:jzoss,项目名称:libgitflow2sharp,代码行数:17,代码来源:InitTests.cs

示例7: Init_TestRepositoryContainsDevelopBranch

 public void Init_TestRepositoryContainsDevelopBranch()
 {
     using (_testRepository = new Repository(_testPath))
     {
         _testRepository.Flow().Init(new GitFlowRepoSettings(), author);
         Assert.NotNull(_testRepository.Branches[ _testRepository.Flow().GetPrefixByBranch(GitFlowSetting.Develop)]);
     }
 }
开发者ID:jzoss,项目名称:libgitflow2sharp,代码行数:8,代码来源:InitTests.cs

示例8: Init_TestPrefixIsSet

 public void Init_TestPrefixIsSet()
 {
     using (_testRepository = new Repository(_testPath))
     {
         _testRepository.Flow().Init(new GitFlowRepoSettings(), author);
         var prefix = _testRepository.Flow().GetPrefixByBranch(GitFlowSetting.Develop);
         Assert.NotNull(prefix);
         Assert.NotEmpty(prefix);
     }
 }
开发者ID:jzoss,项目名称:libgitflow2sharp,代码行数:10,代码来源:InitTests.cs


注:本文中的LibGit2Sharp.Repository.Flow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。