From 350a630d8fa9febb5ab89e01b5970f947133b7fb Mon Sep 17 00:00:00 2001 From: TingLiu6 Date: Wed, 20 Apr 2016 23:47:06 -0700 Subject: [PATCH] Add a V2 DRT for Get-Alias --- test/powershell/Get-Alias.Tests.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/powershell/Get-Alias.Tests.ps1 b/test/powershell/Get-Alias.Tests.ps1 index be9e7c00e5..76f026db24 100644 --- a/test/powershell/Get-Alias.Tests.ps1 +++ b/test/powershell/Get-Alias.Tests.ps1 @@ -161,6 +161,16 @@ Describe "Get-Alias DRT Unit Tests" -Tags DRT{ $result.Description| Should Be "" $result.Options| Should Be "None" } + + It "Test get-alias with Definition parameter" { + $returnObject = Get-Alias -Definition Get-Process + For($i = 0; $i -lt $returnObject.Length;$i++) + { + $returnObject[$i] | Should Not BeNullOrEmpty + $returnObject[$i].CommandType | Should Be 'Alias' + $returnObject[$i].Definition | Should Be 'Get-Process' + } + } } Describe "Get-Alias" {