@@ -54,6 +54,7 @@ public void ShouldNotAllowIncrementOfVersion()
5454 [ TestCase ( "Merge branch 'Release-v0.2.0'" , true , "0.2.0" ) ]
5555 [ TestCase ( "Merge remote-tracking branch 'origin/release/0.8.0' into develop/" + MainBranch , true , "0.8.0" ) ]
5656 [ TestCase ( "Merge remote-tracking branch 'refs/remotes/origin/release/2.0.0'" , true , "2.0.0" ) ]
57+ [ TestCase ( "Merge branch 'Releases/0.2.0'" , false , "0.2.0" ) ] // Support Squash Commits
5758 public void TakesVersionFromMergeOfReleaseBranch ( string message , bool isMergeCommit , string expectedVersion )
5859 {
5960 var parents = GetParents ( isMergeCommit ) ;
@@ -83,15 +84,20 @@ public void TakesVersionFromMergeOfReleaseBranch(string message, bool isMergeCom
8384 [ TestCase ( "Finish 0.14.1" , true ) ] // Don't support Syntevo SmartGit/Hg's Gitflow merge commit messages for finishing a 'Hotfix' branch
8485 public void ShouldNotTakeVersionFromMergeOfNonReleaseBranch ( string message , bool isMergeCommit )
8586 {
87+ var configurationBuilder = GitFlowConfigurationBuilder . New ;
88+ configurationBuilder . WithBranch ( "hotfix" , builder => builder . WithIsReleaseBranch ( false ) ) ;
89+ ConfigurationHelper configurationHelper = new ( configurationBuilder . Build ( ) ) ;
90+ var configurationDictionary = configurationHelper . Dictionary ;
91+
8692 var parents = GetParents ( isMergeCommit ) ;
87- AssertMergeMessage ( message , null , parents ) ;
88- AssertMergeMessage ( message + " " , null , parents ) ;
89- AssertMergeMessage ( message + "\r " , null , parents ) ;
90- AssertMergeMessage ( message + "\r " , null , parents ) ;
91- AssertMergeMessage ( message + "\r \n " , null , parents ) ;
92- AssertMergeMessage ( message + "\r \n " , null , parents ) ;
93- AssertMergeMessage ( message + "\n " , null , parents ) ;
94- AssertMergeMessage ( message + "\n " , null , parents ) ;
93+ AssertMergeMessage ( message , null , parents , configurationDictionary ) ;
94+ AssertMergeMessage ( message + " " , null , parents , configurationDictionary ) ;
95+ AssertMergeMessage ( message + "\r " , null , parents , configurationDictionary ) ;
96+ AssertMergeMessage ( message + "\r " , null , parents , configurationDictionary ) ;
97+ AssertMergeMessage ( message + "\r \n " , null , parents , configurationDictionary ) ;
98+ AssertMergeMessage ( message + "\r \n " , null , parents , configurationDictionary ) ;
99+ AssertMergeMessage ( message + "\n " , null , parents , configurationDictionary ) ;
100+ AssertMergeMessage ( message + "\n " , null , parents , configurationDictionary ) ;
95101 }
96102
97103 [ TestCase ( "Merge pull request #165 from organization/Particular/release-1.0.0" , true ) ]
0 commit comments