<commit_before>﻿using GitVersion;
using LibGit2Sharp;
using NUnit.Framework;

[TestFixture]
public class MasterScenarios
{
    [Test]
    public void GivenARepositoryWithCommitsButNoTags_VersionShouldBe_0_1()
    {
        using (var fixture = new EmptyRepositoryFixture(new Config()))
        {
            // Given
            fixture.Repository.MakeACommit();<commit_msg>Unit Tests for Issue #728<commit_after>﻿using GitVersion;
using LibGit2Sharp;
using NUnit.Framework;

[TestFixture]
public class MasterScenarios
{
    [Test]
    public void CanHandleContinuousDelivery()
    {
        var config = new Config
        {
            Branches =
            {
                {
                    "master", new BranchConfig
                    {
                        VersioningMode = VersioningMode.ContinuousDelivery
                    }
                }
            }
        };
        using(var fixture = new EmptyRepositoryFixture(config))
        {
            fixture.Repository.MakeATaggedCommit("1.0.0");
            fixture.Repository.MakeCommits(2);
            fixture.AssertFullSemver("1.0.1+2");
        }
    }

    [Test]
    public void CanHandleContinuousDeployment()
    {
        var config = new Config
        {
            Branches =
            {
                {
                    "master", new BranchConfig
                    {
                        VersioningMode = VersioningMode.ContinuousDeployment
                    }
                }
            }
        };
        using(var fixture = new EmptyRepositoryFixture(config))
        {
            fixture.Repository.MakeATaggedCommit("1.0.0");
            fixture.Repository.MakeCommits(2);
            fixture.AssertFullSemver("1.0.1-ci.2");
        }
    }

    [Test]
    public void GivenARepositoryWithCommitsButNoTags_VersionShouldBe_0_1()
    {
        using (var fixture = new EmptyRepositoryFixture(new Config()))
        {
            // Given
            fixture.Repository.MakeACommit();
{'fraction_non_alphanumeric': 0.08412618928392589, 'fraction_numerical': 0.012518778167250876, 'mean_word_length': 1.5780645161290323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7588119', 'n_tokens_mistral': 542, 'n_tokens_neox': 527, 'n_words': 89}