@@ -60,7 +60,7 @@ public void CanTakeVersionFromHotfixesBranch()
6060
6161 // create hotfix branch
6262 Commands . Checkout ( fixture . Repository , fixture . Repository . CreateBranch ( "hotfixes/1.1.1" ) ) ;
63- fixture . AssertFullSemver ( "1.1.0" ) ; // We are still on a tagged commit
63+ fixture . AssertFullSemver ( "1.1.1+ 0" ) ;
6464 fixture . Repository . MakeACommit ( ) ;
6565
6666 fixture . AssertFullSemver ( "1.1.1-beta.1+1" ) ;
@@ -78,44 +78,44 @@ public void PatchOlderReleaseExample()
7878 r . MakeATaggedCommit ( "2.0.0" ) ;
7979 } ) ;
8080 // Merge hotfix branch to support
81- Commands . Checkout ( fixture . Repository , MainBranch ) ;
81+ fixture . Checkout ( MainBranch ) ;
8282 var tag = fixture . Repository . Tags . Single ( t => t . FriendlyName == "1.1.0" ) ;
83- var supportBranch = fixture . Repository . CreateBranch ( "support-1.1" , ( LibGit2Sharp . Commit ) tag . Target ) ;
84- Commands . Checkout ( fixture . Repository , supportBranch ) ;
83+ fixture . Repository . CreateBranch ( "support-1.1" , ( LibGit2Sharp . Commit ) tag . Target ) ;
84+ fixture . Checkout ( "support-1.1" ) ;
8585 fixture . AssertFullSemver ( "1.1.0" ) ;
8686
8787 // create hotfix branch
88- Commands . Checkout ( fixture . Repository , fixture . Repository . CreateBranch ( "hotfix-1.1.1" ) ) ;
89- fixture . AssertFullSemver ( "1.1.0" ) ; // We are still on a tagged commit
90- fixture . Repository . MakeACommit ( ) ;
88+ fixture . BranchTo ( "hotfix-1.1.1" ) ;
89+ fixture . AssertFullSemver ( "1.1.1+ 0" ) ;
90+ fixture . MakeACommit ( ) ;
9191
9292 fixture . AssertFullSemver ( "1.1.1-beta.1+1" ) ;
93- fixture . Repository . MakeACommit ( ) ;
93+ fixture . MakeACommit ( ) ;
9494 fixture . AssertFullSemver ( "1.1.1-beta.1+2" ) ;
9595
9696 // Create feature branch off hotfix branch and complete
97- Commands . Checkout ( fixture . Repository , fixture . Repository . CreateBranch ( "feature/fix" ) ) ;
97+ fixture . BranchTo ( "feature/fix" ) ;
9898 fixture . AssertFullSemver ( "1.1.1-fix.1+2" ) ;
99- fixture . Repository . MakeACommit ( ) ;
99+ fixture . MakeACommit ( ) ;
100100 fixture . AssertFullSemver ( "1.1.1-fix.1+3" ) ;
101101
102102 fixture . Repository . CreatePullRequestRef ( "feature/fix" , "hotfix-1.1.1" , prNumber : 8 , normalise : true ) ;
103103 fixture . AssertFullSemver ( "1.1.1-PullRequest8.4" ) ;
104- Commands . Checkout ( fixture . Repository , "hotfix-1.1.1" ) ;
105- fixture . Repository . MergeNoFF ( "feature/fix" , Generate . SignatureNow ( ) ) ;
104+ fixture . Checkout ( "hotfix-1.1.1" ) ;
105+ fixture . MergeNoFF ( "feature/fix" ) ;
106106 fixture . AssertFullSemver ( "1.1.1-beta.1+4" ) ;
107107
108108 // Merge hotfix into support branch to complete hotfix
109- Commands . Checkout ( fixture . Repository , "support-1.1" ) ;
110- fixture . Repository . MergeNoFF ( "hotfix-1.1.1" , Generate . SignatureNow ( ) ) ;
109+ fixture . Checkout ( "support-1.1" ) ;
110+ fixture . MergeNoFF ( "hotfix-1.1.1" ) ;
111111 fixture . AssertFullSemver ( "1.1.1+5" ) ;
112- fixture . Repository . ApplyTag ( "1.1.1" ) ;
112+ fixture . ApplyTag ( "1.1.1" ) ;
113113 fixture . AssertFullSemver ( "1.1.1" ) ;
114114
115115 // Verify develop version
116- Commands . Checkout ( fixture . Repository , "develop" ) ;
116+ fixture . Checkout ( "develop" ) ;
117117 fixture . AssertFullSemver ( "2.1.0-alpha.1" ) ;
118- fixture . Repository . MergeNoFF ( "support-1.1" , Generate . SignatureNow ( ) ) ;
118+ fixture . MergeNoFF ( "support-1.1" ) ;
119119 fixture . AssertFullSemver ( "2.1.0-alpha.7" ) ;
120120 }
121121
@@ -167,7 +167,7 @@ public void FeatureOnHotfixFeatureBranchDeleted()
167167 fixture . Checkout ( hotfix451 ) ;
168168 fixture . MergeNoFF ( featureBranch ) ; // commit 2
169169 fixture . Repository . Branches . Remove ( featureBranch ) ;
170- fixture . AssertFullSemver ( "4.5.1-beta.2 " , configuration ) ;
170+ fixture . AssertFullSemver ( "4.5.1-beta.3 " , configuration ) ;
171171 }
172172
173173 /// <summary>
@@ -217,7 +217,8 @@ public void FeatureOnHotfixFeatureBranchNotDeleted()
217217 fixture . MakeACommit ( "blabla" ) ; // commit 1
218218 fixture . Checkout ( hotfix451 ) ;
219219 fixture . MergeNoFF ( featureBranch ) ; // commit 2
220- fixture . AssertFullSemver ( "4.5.1-beta.2" , configuration ) ;
220+
221+ fixture . AssertFullSemver ( "4.5.1-beta.3" , configuration ) ;
221222 }
222223
223224 [ Test ]
0 commit comments