Add Unit Test for Group-Object

This commit is contained in:
TingLiu6 2016-05-07 02:24:08 -07:00
parent 8718d9f6a8
commit 7aa80eeb55

View File

@ -1,3 +1,16 @@
Describe "Group-Object DRT Unit Tests" -Tags DRT{
It "Test for CaseSensitive switch" {
$testObject = 'aA', 'aA', 'AA', 'AA'
$results = $testObject | Group-Object -CaseSensitive
$results.Count | Should Be 2
$results.Name.Count | Should Be 2
$results.Group.Count | Should Be 4
$results.Name | Should Be aA,AA
$results.Group | Should Be aA,aA,AA,AA
$results.Group.GetType().BaseType | Should Be Array
}
}
Describe "Group-Object" {
$testObject = Get-ChildItem