File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/GitVersionCore.Tests/BuildServers Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,24 +10,25 @@ public class VsoAgentTests
10
10
11
11
string key = "BUILD_BUILDNUMBER" ;
12
12
13
- private void SetEnvironmentVariableForTest ( )
13
+
14
+ [ SetUp ]
15
+ public void SetEnvironmentVariableForTest ( )
14
16
{
15
17
Environment . SetEnvironmentVariable ( key , "Some Build_Value $(GitVersion_FullSemVer)" , EnvironmentVariableTarget . Process ) ;
16
18
}
17
19
18
- private void ClearEnvironmentVariableForTest ( )
20
+ [ TearDown ]
21
+ public void ClearEnvironmentVariableForTest ( )
19
22
{
20
23
Environment . SetEnvironmentVariable ( key , null , EnvironmentVariableTarget . Process ) ;
21
24
}
22
25
23
26
[ Test ]
24
27
public void Develop_branch ( )
25
28
{
26
- SetEnvironmentVariableForTest ( ) ;
27
29
var versionBuilder = new VsoAgent ( ) ;
28
30
var vars = new TestableVersionVariables ( fullSemVer : "0.0.0-Unstable4" ) ;
29
31
var vsVersion = versionBuilder . GenerateSetVersionMessage ( vars ) ;
30
- ClearEnvironmentVariableForTest ( ) ;
31
32
32
33
vsVersion . ShouldBe ( "##vso[build.updatebuildnumber]Some Build_Value 0.0.0-Unstable4" ) ;
33
34
}
You can’t perform that action at this time.
0 commit comments