Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example DSC Resource Unit Tests for Test-TargetResource where does not exist but should
Context 'Virtual Disk does not exist but should' {
Mock Get-iSCSIVirtualDisk
It 'should return false' {
$Splat = $TestVirtualDisk.Clone()
Test-TargetResource @Splat | Should Be $False
It 'should call expected Mocks' {
Assert-MockCalled -commandName Get-iSCSIVirtualDisk -Exactly 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment