File tree Expand file tree Collapse file tree
DSCResources/DSR_ReplaceText Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,6 +357,8 @@ function Assert-ParametersValid
357357#>
358358function Add-ConfigurationEntry
359359{
360+ [OutputType ([String ])]
361+ [CmdletBinding ()]
360362 param
361363 (
362364 [Parameter ()]
@@ -368,13 +370,13 @@ function Add-ConfigurationEntry
368370 $Text
369371 )
370372
371- $stringBuilder = New-Object System.Text.StringBuilder
373+ $stringBuilder = New-Object - TypeName System.Text.StringBuilder
372374
373375 $fileContentArray = $FileContent.Trim () -split ' \n'
374376
375377 foreach ($line in $fileContentArray )
376378 {
377- $null = $stringBuilder.AppendLine ($line.Trim () )
379+ $null = $stringBuilder.AppendLine ($line )
378380 }
379381
380382 $null = $stringBuilder.AppendLine ($Text )
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ Setting3.Test=Value4
217217 }
218218 }
219219
220- Context ' File exists and search text can not be found' {
220+ Context ' File exists and search text can not be found' {
221221 # verifiable (should be called) mocks
222222 Mock `
223223 - CommandName Assert-ParametersValid `
@@ -400,7 +400,7 @@ Setting3.Test=Value4
400400 } | Should -Not - Throw
401401 }
402402
403- It ' Should return true ' {
403+ It ' Should return false ' {
404404 $script :result | Should - Be $false
405405 }
406406
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments