@@ -28,7 +28,7 @@ Describe 'Write-ErrorLog' {
2828 Write-ErrorLog - Message ' My Error'
2929
3030 # Assert
31- Assert-MockCalled - Scope ' It ' - CommandName ' Write-ScriptLoggerLog ' - Times 1 - Exactly
31+ Should - Invoke - CommandName ' Write-ScriptLoggerLog ' - Scope ' It ' - Times 1 - Exactly
3232 }
3333 }
3434
@@ -47,7 +47,7 @@ Describe 'Write-ErrorLog' {
4747 }
4848
4949 # Assert
50- Assert-MockCalled - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 1 - Exactly
50+ Should - Invoke - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 1 - Exactly
5151 }
5252 }
5353 It ' should invoke the mock twice for an array of 2 messages' {
@@ -58,7 +58,7 @@ Describe 'Write-ErrorLog' {
5858 Write-ErrorLog - Message ' My Error' , ' My Error'
5959
6060 # Assert
61- Assert-MockCalled - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 2 - Exactly
61+ Should - Invoke - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 2 - Exactly
6262 }
6363 }
6464
@@ -73,7 +73,7 @@ Describe 'Write-ErrorLog' {
7373 Write-ErrorLog - ErrorRecord $errorRecord , $errorRecord
7474
7575 # Assert
76- Assert-MockCalled - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 2 - Exactly
76+ Should - Invoke - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 2 - Exactly
7777 }
7878 }
7979
@@ -85,7 +85,7 @@ Describe 'Write-ErrorLog' {
8585 ' My Error' , ' My Error' , ' My Error' | Write-ErrorLog
8686
8787 # Assert
88- Assert-MockCalled - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 3 - Exactly
88+ Should - Invoke - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 3 - Exactly
8989 }
9090 }
9191
@@ -100,7 +100,7 @@ Describe 'Write-ErrorLog' {
100100 $errorRecord , $errorRecord , $errorRecord | Write-ErrorLog
101101
102102 # Assert
103- Assert-MockCalled - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 3 - Exactly
103+ Should - Invoke - Scope ' It' - CommandName ' Write-ScriptLoggerLog' - Times 3 - Exactly
104104 }
105105 }
106106 }
@@ -193,7 +193,7 @@ Describe 'Write-ErrorLog' {
193193 Write-ErrorLog - Message ' My Error'
194194
195195 # Assert
196- Assert-MockCalled - Scope ' It' - CommandName ' Write-ScriptLoggerPlatformLog' - Times 1 - Exactly
196+ Should - Invoke - Scope ' It' - CommandName ' Write-ScriptLoggerPlatformLog' - Times 1 - Exactly
197197 }
198198 }
199199
@@ -215,7 +215,7 @@ Describe 'Write-ErrorLog' {
215215 }
216216
217217 # Assert
218- Assert-MockCalled - Scope ' It' - CommandName ' Write-ScriptLoggerPlatformLog' - Times 1 - Exactly
218+ Should - Invoke - Scope ' It' - CommandName ' Write-ScriptLoggerPlatformLog' - Times 1 - Exactly
219219 }
220220 }
221221 }
@@ -241,7 +241,7 @@ Describe 'Write-ErrorLog' {
241241 Write-ErrorLog - Message ' My Error'
242242
243243 # Assert
244- Assert-MockCalled - Scope ' It' - CommandName ' Write-Error' - Times 1 - Exactly
244+ Should - Invoke - Scope ' It' - CommandName ' Write-Error' - Times 1 - Exactly
245245 }
246246 }
247247
@@ -263,7 +263,7 @@ Describe 'Write-ErrorLog' {
263263 }
264264
265265 # Assert
266- Assert-MockCalled - Scope ' It' - CommandName ' Write-Error' - Times 1 - Exactly
266+ Should - Invoke - Scope ' It' - CommandName ' Write-Error' - Times 1 - Exactly
267267 }
268268 }
269269 }
0 commit comments