@@ -97,7 +97,7 @@ public void ShouldOutputDotEnvEntries(string variableName, string expectedValue)
97
97
98
98
outputGenerator . Execute ( versionVariables , new ( ) ) ;
99
99
var output = consoleBuilder . ToString ( ) ;
100
- output . ShouldContain ( "GitVersion_" + variableName + "=" + expectedValue + " \n ") ;
100
+ output . ShouldContain ( $ "GitVersion_{ variableName } = { expectedValue } { SysEnv . NewLine } ") ;
101
101
}
102
102
103
103
[ TestCase ]
@@ -123,7 +123,7 @@ public void ShouldOutputAllCalculatedVariablesAsDotEnvEntries()
123
123
124
124
outputGenerator . Execute ( versionVariables , new ( ) ) ;
125
125
var output = consoleBuilder . ToString ( ) ;
126
- var totalOutputLines = output . Split ( " \n " ) . Length - 1 ; // ignore last item that also ends with \n
126
+ var totalOutputLines = output . Split ( SysEnv . NewLine ) . Length - 1 ; // ignore last item that also ends with the newline string
127
127
Assert . That ( totalOutputLines , Is . EqualTo ( versionVariables . Count ( ) ) ) ;
128
128
}
129
129
@@ -158,7 +158,7 @@ public void ShouldOutputAllDotEnvEntriesEvenForMinimalRepositories(string variab
158
158
159
159
outputGenerator . Execute ( versionVariables , new ( ) ) ;
160
160
var output = consoleBuilder . ToString ( ) ;
161
- output . ShouldContain ( "GitVersion_" + variableName + "=" + expectedValue + " \n ") ;
161
+ output . ShouldContain ( $ "GitVersion_{ variableName } = { expectedValue } { SysEnv . NewLine } ") ;
162
162
}
163
163
164
164
[ TestCase ]
@@ -184,7 +184,7 @@ public void ShouldOutputAllCalculatedVariablesAsDotEnvEntriesEvenForMinimalRepos
184
184
185
185
outputGenerator . Execute ( versionVariables , new ( ) ) ;
186
186
var output = consoleBuilder . ToString ( ) ;
187
- var totalOutputLines = output . Split ( " \n " ) . Length - 1 ; // ignore last item that also ends with \n
187
+ var totalOutputLines = output . Split ( SysEnv . NewLine ) . Length - 1 ; // ignore last item that also ends with the newline string
188
188
Assert . That ( totalOutputLines , Is . EqualTo ( versionVariables . Count ( ) ) ) ;
189
189
}
190
190
0 commit comments