From 2824e136cbc5953bd857ef67987a707b51d33e6b Mon Sep 17 00:00:00 2001 From: James Truher Date: Tue, 30 Aug 2016 16:14:20 -0700 Subject: [PATCH] update exception messages --- .../Microsoft.PowerShell.Security/SecureString.Tests.ps1 | 2 +- .../Microsoft.PowerShell.Utility/Debug-Runspace.Tests.ps1 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Security/SecureString.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Security/SecureString.Tests.ps1 index ac0f16d137..9fc6cfe9f8 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Security/SecureString.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Security/SecureString.Tests.ps1 @@ -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" diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Debug-Runspace.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Debug-Runspace.Tests.ps1 index 7f5c00ab5c..4c5b13fccb 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Debug-Runspace.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Debug-Runspace.Tests.ps1 @@ -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"