File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
GitVersionCore.Tests/IntegrationTests Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
1
2
using GitVersion ;
2
3
using LibGit2Sharp ;
3
4
using NUnit . Framework ;
4
5
5
6
[ TestFixture ]
6
7
public class FeatureBranchScenarios
7
8
{
9
+ [ Test ]
10
+ public void ShouldInheritIncrementCorrectlyWithMultiplePossibleParentsAndWeirdlyNamedDevelopBranch ( )
11
+ {
12
+ using ( var fixture = new EmptyRepositoryFixture ( new Config ( ) ) )
13
+ {
14
+ fixture . Repository . MakeATaggedCommit ( "1.0.0" ) ;
15
+ fixture . Repository . CreateBranch ( "development" ) ;
16
+ fixture . Repository . Checkout ( "development" ) ;
17
+
18
+ //Create an initial feature branch
19
+ var feature123 = fixture . Repository . CreateBranch ( "feature/JIRA-123" ) ;
20
+ fixture . Repository . Checkout ( "feature/JIRA-123" ) ;
21
+ fixture . Repository . MakeCommits ( 1 ) ;
22
+
23
+ //Merge it
24
+ fixture . Repository . Checkout ( "development" ) ;
25
+ fixture . Repository . Merge ( feature123 , new Signature ( "me" , "[email protected] " , DateTimeOffset . Now ) ) ;
26
+
27
+ //Create a second feature branch
28
+ fixture . Repository . CreateBranch ( "feature/JIRA-124" ) ;
29
+ fixture . Repository . Checkout ( "feature/JIRA-124" ) ;
30
+ fixture . Repository . MakeCommits ( 1 ) ;
31
+
32
+ fixture . AssertFullSemver ( "1.1.0-JIRA-124.1+2" ) ;
33
+ }
34
+ }
35
+
8
36
[ Test ]
9
37
public void ShouldNotUseNumberInFeatureBranchAsPreReleaseNumberOffDevelop ( )
10
38
{
You can’t perform that action at this time.
0 commit comments