Skip to content

Commit 25866da

Browse files
Turnerjarturcic
authored andcommitted
Add test case
1 parent e773534 commit 25866da

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using GitVersion.Configuration;
2+
using GitVersion.Core.Tests.Helpers;
3+
using GitVersion.Model.Configuration;
4+
using NUnit.Framework;
5+
using Shouldly;
6+
7+
namespace GitVersion.Core.Tests.Configuration;
8+
9+
[TestFixture]
10+
public class ConfigExtensionsTests : TestBase
11+
{
12+
[Test]
13+
public void GetReleaseBranchConfigReturnsAllReleaseBranches()
14+
{
15+
var config = new Config()
16+
{
17+
Branches = new Dictionary<string, BranchConfig>
18+
{
19+
{ "foo", new BranchConfig { Name = "foo" } },
20+
{ "bar", new BranchConfig { Name = "bar", IsReleaseBranch = true } },
21+
{ "baz", new BranchConfig { Name = "baz", IsReleaseBranch = true } }
22+
}
23+
};
24+
25+
var result = config.GetReleaseBranchConfig();
26+
27+
result.Count.ShouldBe(2);
28+
result.ShouldNotContain(b => b.Key == "foo");
29+
}
30+
}

0 commit comments

Comments
 (0)