[InlineData("master", "{branchNameSuffix}", "[mr]", "aste")] // Ignore Spelling: mr,aste
        public void Resolve_CustomPattern_Replaces_BranchName(string branchName, string input, string pattern, string expected)
        {
            // Arrange
            var sut     = new BranchNameSuffixTokenRule(pattern);
            var context = new MockVersionContext
            {
                Result =
                {
                    CanonicalBranchName = branchName
                }
            };

            // Act
            var result = sut.Resolve(context, input);

            // Assert
            result.Should().Be(expected);
        }
Exemple #2
0
        public void Resolve_CustomPattern_Replaces_BranchName(string branchName, string input, string pattern, string expected)
        {
            // Arrange
            var sut = new BranchNameSuffixTokenRule(pattern);

            using (var fixture = new EmptyRepositoryFixture())
            {
                var context = new VersionContext(fixture.Repository)
                {
                    Result =
                    {
                        CanonicalBranchName = branchName
                    }
                };

                // Act
                var result = sut.Resolve(context, input);

                // Assert
                result.Should().Be(expected);
            }
        }