Porting Management DRT TTests from psl-monad to Pester

This commit is contained in:
Bryce Milton 2016-04-20 21:56:49 -07:00
parent 613d9c3cad
commit 54efb3cb52
4 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ Describe "Add-Content cmdlet tests" {
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 903880)]
{add-content -path $() -value "ShouldNotWorkBecausePathIsInvalid" -ea stop} | Should Throw "Cannot bind argument to parameter 'Path'"
}
It "should throw 'PSNotSupportedException' when you add-content to an unsupported provider" {
It "should throw 'PSNotSupportedException' when you add-content to an unsupported provider" -Skip:($IsLinux -Or $IsOSX) {
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 906022)]
{add-content -path HKLM:\\software\\microsoft -value "ShouldNotWorkBecausePathIsUnsupported" -ea stop} | Should Throw "IContentCmdletProvider interface is not implemented"
}

View File

@ -19,7 +19,7 @@ Describe "Clear-Content cmdlet tests" {
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 903880)]
{clear-content -path $() -ea stop} | Should Throw "Cannot bind argument to parameter 'Path'"
}
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" {
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" -Skip:($IsLinux -Or $IsOSX) {
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 906022)]
{clear-content -path HKLM:\\software\\microsoft -ea stop} | Should Throw "IContentCmdletProvider interface is not implemented"
}

View File

@ -80,7 +80,7 @@ Describe "Get-Content" {
Get-Content PATH | Should Be $expectedoutput
popd
}
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" {
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" -Skip:($IsLinux -Or $IsOSX) {
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 906022)]
{get-content -path HKLM:\\software\\microsoft -ea stop} | Should Throw "IContentCmdletProvider interface is not implemented"
}

View File

@ -34,7 +34,7 @@ Describe "Set-Content cmdlet tests" {
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 903880)]
{set-content -path $() -value "ShouldNotWorkBecausePathIsInvalid" -ea stop} | Should Throw "Cannot bind argument to parameter 'Path'"
}
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" {
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" -Skip:($IsLinux -Or $IsOSX) {
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 906022)]
{set-content -path HKLM:\\software\\microsoft -value "ShouldNotWorkBecausePathIsUnsupported" -ea stop} | Should Throw "IContentCmdletProvider interface is not implemented"
}