mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Remove trailing whitespace (#3001)
This commit is contained in:
1 parent
f4f576c92b
commit
02b5f357a2
1394 files changed
+22628
-22629
No files matched your search
@@ -3,13 +3,13 @@ Describe "Write-Error DRT Unit Tests" -Tags "CI" {
|
||||
$e = Write-Error myerrortext 2>&1
|
||||
$e | Should Not BeNullOrEmpty
|
||||
$e.GetType().Name | Should Be 'ErrorRecord'
|
||||
|
||||
|
||||
#Exception verification
|
||||
$e.Exception.GetType().Name | Should Be 'WriteErrorException'
|
||||
$e.Exception.Message | Should Be 'myerrortext'
|
||||
$e.Exception.Data.Count | Should Be 0
|
||||
$e.Exception.InnerException | Should BeNullOrEmpty
|
||||
|
||||
$e.Exception.InnerException | Should BeNullOrEmpty
|
||||
|
||||
#ErrorCategoryInfo verification
|
||||
$e.CategoryInfo | Should Not BeNullOrEmpty
|
||||
$e.CategoryInfo.Category | Should Be 'NotSpecified'
|
||||
@@ -22,28 +22,28 @@ Describe "Write-Error DRT Unit Tests" -Tags "CI" {
|
||||
#ErrorDetails verification
|
||||
$e.ErrorDetails | Should BeNullOrEmpty
|
||||
|
||||
#FullyQualifiedErrorId verification
|
||||
#FullyQualifiedErrorId verification
|
||||
$e.FullyQualifiedErrorId | Should Be 'Microsoft.PowerShell.Commands.WriteErrorException'
|
||||
|
||||
#InvocationInfo verification
|
||||
$e.InvocationInfo | Should Not BeNullOrEmpty
|
||||
$e.InvocationInfo.MyCommand.Name | Should BeNullOrEmpty
|
||||
$e.InvocationInfo.MyCommand.Name | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Should be works with all parameters" {
|
||||
$exception = New-Object -TypeName System.ArgumentNullException -ArgumentList paramname
|
||||
$exception = New-Object -TypeName System.ArgumentNullException -ArgumentList paramname
|
||||
$e = Write-Error -Message myerrortext -Exception $exception -ErrorId myerrorid -Category syntaxerror -TargetObject TargetObject -CategoryActivity myactivity -CategoryReason myreason -CategoryTargetName mytargetname -CategoryTargetType mytargettype -RecommendedAction myrecommendedaction 2>&1
|
||||
$e | Should Not BeNullOrEmpty
|
||||
$e.GetType().Name | Should Be 'ErrorRecord'
|
||||
|
||||
#Exception verification
|
||||
$e.Exception | Should Not BeNullOrEmpty
|
||||
$e.Exception.GetType().Name | Should Be 'ArgumentNullException'
|
||||
$e.Exception.GetType().Name | Should Be 'ArgumentNullException'
|
||||
$e.Exception.ParamName | Should Be 'paramname'
|
||||
$e.Exception.Data.Count | Should Be 0
|
||||
$e.Exception.InnerException | Should BeNullOrEmpty
|
||||
|
||||
#TargetObject verification
|
||||
$e.Exception.InnerException | Should BeNullOrEmpty
|
||||
|
||||
#TargetObject verification
|
||||
$e.TargetObject | Should Be 'TargetObject'
|
||||
|
||||
#FullyQualifiedErrorId verification
|
||||
@@ -65,7 +65,7 @@ Describe "Write-Error DRT Unit Tests" -Tags "CI" {
|
||||
|
||||
#InvocationInfo verification
|
||||
$e.InvocationInfo | Should Not BeNullOrEmpty
|
||||
$e.InvocationInfo.MyCommand.Name | Should BeNullOrEmpty
|
||||
$e.InvocationInfo.MyCommand.Name | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Should be works with all parameters" {
|
||||
|
||||
Reference in new issue
Block a user