Skip to content

Commit 58f1c2f

Browse files
committed
Fix tests
1 parent 3be68e8 commit 58f1c2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Unit/Classes/AdcsOnlineResponder.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ Describe 'AdcsOnlineResponder\GetCurrentState()' -Tag 'HiddenMember' {
514514
}
515515

516516
Mock -CommandName Install-AdcsOnlineResponder -MockWith {
517-
throw 'Microsoft.CertificateServices.Deployment.Common.OCSP.OnlineResponderSetupException'
517+
throw [Microsoft.CertificateServices.Deployment.Common.OCSP.OnlineResponderSetupException]::new()
518518
}
519519
}
520520

@@ -876,7 +876,7 @@ Describe 'AdcsOnlineResponder\AssertProperties()' -Tag 'AssertProperties' {
876876
IsSingleInstance = 'Yes'
877877
}
878878

879-
{ $mockInstance.AssertProperties($mockProperties) } | Should -Throw
879+
{ $script:mockInstance.AssertProperties($mockProperties) } | Should -Throw
880880
}
881881
}
882882
}
@@ -894,7 +894,7 @@ Describe 'AdcsOnlineResponder\AssertProperties()' -Tag 'AssertProperties' {
894894
IsSingleInstance = 'Yes'
895895
}
896896

897-
{ $mockInstance.AssertProperties($mockProperties) } | Should -Not -Throw
897+
{ $script:mockInstance.AssertProperties($mockProperties) } | Should -Not -Throw
898898
}
899899
}
900900
}

0 commit comments

Comments
 (0)