public void FeatureDebugMergedVersion() { var repoReader = new GitRepoReader(TestRepositories.FeatureDebugMergedRepository(), string.Empty); repoReader.CommitCountDevelopSinceLastMinorCoreVersion.Should().Be(4); repoReader.CommitCountUniqueToFeature.Should().Be(7); }
public void RepoWithoutHeadNoBranchTest() { Action action = () => { _ = GenerateVersionNumber(TestRepositories.DeteachedHeadRepo()); }; action.Should().Throw <InvalidOperationException>(); }
public void RepoWithoutHeadIncorrectBranchTest() { Action action = () => { _ = GenerateVersionNumber(TestRepositories.DeteachedHeadRepo(), "feature/a"); }; action.Should().Throw <ArgumentException>(); }
public void MasterPastDevelopTest() { var repoReader = new GitRepoReader(TestRepositories.MasterAheadOfDevelopRepository(), string.Empty); repoReader.CurrentBranch.Name.Should().Be(DashDashVersion.Constants.DevelopBranchName); repoReader.CommitCountDevelopSinceLastMinorCoreVersion.Should().Be(1); repoReader.HeadCommitHash.Should().Be("b"); repoReader.CurrentCoreVersion.SemVer.Should().Be("0.0.0"); }
public void RepoWithoutHeadIncorrectPartialBranchNameTest() { Action action = () => { _ = GenerateVersionNumber(TestRepositories.DeteachedHeadRepo(), "evelop"); }; action.Should().Throw <ArgumentException>(); }
public void FeatureRepoTest() { var repoReader = new GitRepoReader(TestRepositories.FeatureBranchOnFeatureBranchRepository(), string.Empty); repoReader.CommitCountUniqueToFeature.Should().Be(2); repoReader.CommitCountDevelopSinceLastMinorCoreVersion.Should().Be(1); repoReader.HeadCommitHash.Should().Be("d"); repoReader.CurrentCoreVersion.SemVer.Should().Be("0.0.0"); repoReader.CurrentBranch.Name.Should().Be($"{DashDashVersion.Constants.FeatureBranchName}/B"); }
public void RemoteDevelopRepoTest() { var repoReader = new GitRepoReader(TestRepositories.RemoteDevelopRepository(), string.Empty); repoReader.CommitCountUniqueToFeature.Should().Be(0); repoReader.CommitCountDevelopSinceLastMinorCoreVersion.Should().Be(1); repoReader.CurrentBranch.Name.Should().Be(DashDashVersion.Constants.DevelopBranchName); repoReader.CurrentCoreVersion.SemVer.Should().Be("0.0.0"); repoReader.HeadCommitHash.Should().Be("b"); }
public void ReleaseRepoWithTagTest() { var repoReader = new GitRepoReader(TestRepositories.ReleaseBranchRepositoryWithTaggedRc(), string.Empty); repoReader.CommitCountUniqueToFeature.Should().Be(3); repoReader.CommitCountDevelopSinceLastMinorCoreVersion.Should().Be(1); repoReader.HeadCommitHash.Should().Be("e"); repoReader.CurrentCoreVersion.SemVer.Should().Be("0.0.0"); repoReader.CurrentBranch.Name.Should().Be($"{DashDashVersion.Constants.ReleaseBranchName}/1.0.0"); repoReader.HighestMatchingTagForReleaseCandidate?.ToString().Should().Be("1.0.0-rc.2"); }
public void ServiceRepositoryTest() { var version = GenerateVersionNumber(TestRepositories.ServiceRepository()); version.SemVer.Should().Be("1.5.0"); }
public void DevelopRepoVersionTest() { var version = GenerateVersionNumber(TestRepositories.TwoCommitsOnDevelopRepository()); version.SemVer.Should().Be("0.1.0-dev.1"); }
public void MasterRepoVersionTest() { var version = GenerateVersionNumber(TestRepositories.MasterRepository()); version.SemVer.Should().Be("1.0.0"); }
public void FeatureRepoVersionTest() { var version = GenerateVersionNumber(TestRepositories.FeatureBranchOnFeatureBranchRepository()); version.SemVer.Should().Be("0.1.0-dev.1.B.2"); }
public void PatchReleaseTest() { var version = GenerateVersionNumber(TestRepositories.PatchReleaseRepository()); version.SemVer.Should().Be("0.2.0-dev.3"); }
public void ReleaseRepoWithTagVersionTest() { var version = GenerateVersionNumber(TestRepositories.ReleaseBranchRepositoryWithTaggedRc()); version.SemVer.Should().Be("1.0.0-rc.3"); }
public void RemoteBugfixRepositoryTest() { var version = GenerateVersionNumber(TestRepositories.RemoteBugfixRepository(), "bugfix/test"); version.SemVer.Should().Be("0.1.0-dev.1.test.1"); }
public void RepoWithoutHeadFullRemotePathTest() { var version = GenerateVersionNumber(TestRepositories.DeteachedHeadRepo(), "A"); version.SemVer.Should().Be("0.2.0-dev.0.FeatureA.0"); }
public void RepoWithoutHeadMasterTest() { var version = GenerateVersionNumber(TestRepositories.DeteachedHeadRepo(), "master"); version.SemVer.Should().Be("0.1.0"); }
public void RepoWithoutHeadDevelopTest() { var version = GenerateVersionNumber(TestRepositories.DeteachedHeadRepo(), "develop"); version.SemVer.Should().Be("0.2.0-dev.0"); }