mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Add Unit Test for Group-Object
This commit is contained in:
1 parent
8718d9f6a8
commit
7aa80eeb55
1 file changed
+13
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user