Skip to content

Instantly share code, notes, and snippets.

@bgelens
Created May 2, 2017 12:59
Show Gist options
  • Save bgelens/fbd6314fac94dc72255e4660ac63f53f to your computer and use it in GitHub Desktop.
Save bgelens/fbd6314fac94dc72255e4660ac63f53f to your computer and use it in GitHub Desktop.
# first test
Describe 'MSFT_LMHost\Test-TargetResource' {
Context 'Invoking with LMHost currently enabled' {
Mock -CommandName 'Test-LMHostEnabled' -MockWith {return $true}
It 'Should return "true" when Enable is set to "true" and current state is "true"' {
Test-TargetResource -IsSingleInstance 'Yes' -Enable $true | Should Be $true
}
It 'Should return "false" when Enable is set to "false" and current state is "true"' {
Test-TargetResource -IsSingleInstance 'Yes' -Enable $false | Should Be $false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment