mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
update exception messages
This commit is contained in:
@@ -25,7 +25,7 @@ Describe "SecureString conversion tests" -Tags "CI" {
|
||||
try {
|
||||
$badkey = [byte[]]@(1,2)
|
||||
ConvertFrom-SecureString -securestring $secureString -key $badkey
|
||||
throw "Execution OK"
|
||||
throw "Command did not throw exception"
|
||||
}
|
||||
catch {
|
||||
$_.FullyQualifiedErrorId | should be "Argument,Microsoft.PowerShell.Commands.ConvertFromSecureStringCommand"
|
||||
|
||||
@@ -15,7 +15,7 @@ Describe "Debug-Runspace" -tag "CI" {
|
||||
It "Debugging a runspace should fail if the name is ambiguous" {
|
||||
try {
|
||||
Debug-Runspace -Name "My*" -ea stop
|
||||
throw "Execution OK"
|
||||
throw "Command did not throw exception"
|
||||
}
|
||||
catch {
|
||||
$_.FullyQualifiedErrorId | should be "DebugRunspaceTooManyRunspaceFound,Microsoft.PowerShell.Commands.DebugRunspaceCommand"
|
||||
@@ -25,7 +25,7 @@ Describe "Debug-Runspace" -tag "CI" {
|
||||
It "Debugging a runspace should fail if the name is not found" {
|
||||
try {
|
||||
Debug-Runspace -Name "dflkjsdkfjldkjssldfj" -ea stop
|
||||
throw "Execution OK"
|
||||
throw "Command did not throw exception"
|
||||
}
|
||||
catch {
|
||||
$_.FullyQualifiedErrorId | should be "DebugRunspaceNoRunspaceFound,Microsoft.PowerShell.Commands.DebugRunspaceCommand"
|
||||
@@ -36,7 +36,7 @@ Describe "Debug-Runspace" -tag "CI" {
|
||||
try {
|
||||
$rs2.Close()
|
||||
Debug-Runspace -runspace $rs2 -ea stop
|
||||
throw "Execution OK"
|
||||
throw "Command did not throw exception"
|
||||
}
|
||||
catch {
|
||||
$_.FullyQualifiedErrorId | should be "InvalidOperation,Microsoft.PowerShell.Commands.DebugRunspaceCommand"
|
||||
@@ -47,7 +47,7 @@ Describe "Debug-Runspace" -tag "CI" {
|
||||
try {
|
||||
$rs1.Debugger.SetDebugMode("None")
|
||||
Debug-Runspace -runspace $rs1 -ea stop
|
||||
throw "Execution OK"
|
||||
throw "Command did not throw exception"
|
||||
}
|
||||
catch {
|
||||
$_.FullyQualifiedErrorId | should be "InvalidOperation,Microsoft.PowerShell.Commands.DebugRunspaceCommand"
|
||||
|
||||
Reference in New Issue
Block a user