@@ -216,7 +216,7 @@ Describe 'Add-SqlDscTraceFlag' -Tag 'Public' {
216216 }
217217
218218 It ' Should de-duplicate trace flags when only duplicates are provided' {
219- { Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 4199 - Force } | Should -Not - Throw
219+ $null = Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 4199 - Force
220220
221221 Should - Invoke - CommandName Set-SqlDscTraceFlag - ParameterFilter {
222222 $TraceFlag.Count -eq 1 -and
@@ -225,7 +225,7 @@ Describe 'Add-SqlDscTraceFlag' -Tag 'Public' {
225225 }
226226
227227 It ' Should de-duplicate trace flags when mix of unique and duplicates are provided' {
228- { Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 3226 , 4199 , 3226 - Force } | Should -Not - Throw
228+ $null = Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 3226 , 4199 , 3226 - Force
229229
230230 Should - Invoke - CommandName Set-SqlDscTraceFlag - ParameterFilter {
231231 $TraceFlag.Count -eq 2 -and
@@ -235,7 +235,7 @@ Describe 'Add-SqlDscTraceFlag' -Tag 'Public' {
235235 }
236236
237237 It ' Should handle multiple duplicates of multiple trace flags' {
238- { Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 4199 , 3226 , 3226 , 3226 , 1222 - Force } | Should -Not - Throw
238+ $null = Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 4199 , 3226 , 3226 , 3226 , 1222 - Force
239239
240240 Should - Invoke - CommandName Set-SqlDscTraceFlag - ParameterFilter {
241241 $TraceFlag.Count -eq 3 -and
@@ -257,7 +257,7 @@ Describe 'Add-SqlDscTraceFlag' -Tag 'Public' {
257257 }
258258
259259 It ' Should de-duplicate when adding trace flags that include duplicates and existing flag' {
260- { Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 3226 , 4199 - Force } | Should -Not - Throw
260+ $null = Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 3226 , 4199 - Force
261261
262262 Should - Invoke - CommandName Set-SqlDscTraceFlag - ParameterFilter {
263263 $TraceFlag.Count -eq 2 -and
@@ -267,14 +267,14 @@ Describe 'Add-SqlDscTraceFlag' -Tag 'Public' {
267267 }
268268
269269 It ' Should de-duplicate when all provided trace flags are duplicates of existing flag' {
270- { Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 3226 , 3226 - Force } | Should -Not - Throw
270+ $null = Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 3226 , 3226 - Force
271271
272272 # Should not call Set-SqlDscTraceFlag when all flags already exist (idempotent)
273273 Should - Invoke - CommandName Set-SqlDscTraceFlag - Exactly - Times 0 - Scope It
274274 }
275275
276276 It ' Should de-duplicate complex scenario with existing and new flags' {
277- { Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 4199 , 3226 , 1222 , 1222 - Force } | Should -Not - Throw
277+ $null = Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 4199 , 3226 , 1222 , 1222 - Force
278278
279279 Should - Invoke - CommandName Set-SqlDscTraceFlag - ParameterFilter {
280280 $TraceFlag.Count -eq 3 -and
@@ -296,7 +296,7 @@ Describe 'Add-SqlDscTraceFlag' -Tag 'Public' {
296296 }
297297
298298 It ' Should de-duplicate and merge with multiple existing trace flags' {
299- { Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 4199 , 3226 , 1222 - Force } | Should -Not - Throw
299+ $null = Add-SqlDscTraceFlag - ServiceObject $mockServiceObject - TraceFlag 4199 , 4199 , 3226 , 1222 - Force
300300
301301 Should - Invoke - CommandName Set-SqlDscTraceFlag - ParameterFilter {
302302 $TraceFlag.Count -eq 3 -and
0 commit comments