mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Merge branch 'master' into GroupObjectTests
This commit is contained in:
commit
9bf21a7460
19 files changed
+380
-95
No files matched your search
@@ -1,3 +1,23 @@
|
||||
Describe "ConvertFrom-StringData DRT Unit Tests" -Tags DRT {
|
||||
It "Should able to throw error when convert invalid line" {
|
||||
$str =@"
|
||||
#comments here
|
||||
abc
|
||||
#comments here
|
||||
def=content of def
|
||||
"@
|
||||
try
|
||||
{
|
||||
ConvertFrom-StringData $str
|
||||
Throw "we expect 'InvalidOperation' exception"
|
||||
}
|
||||
catch
|
||||
{
|
||||
$_.FullyQualifiedErrorId | Should be "InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Describe "ConvertFrom-StringData" {
|
||||
$sampleData = @'
|
||||
foo = 0
|
||||
|
||||
@@ -23,3 +23,22 @@ Describe "Format-Custom" {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Describe "Format-Custom DRT basic functionality" -Tags DRT{
|
||||
It "Format-Custom with subobject should work"{
|
||||
$expectResult1 = "this is the name"
|
||||
$expectResult2 = "this is the name of the sub object"
|
||||
$testObject = @{}
|
||||
$testObject.name = $expectResult1
|
||||
$testObject.subObjectValue = @{}
|
||||
$testObject.subObjectValue.name = $expectResult2
|
||||
$testObject.subObjectValue.array = (0..63)
|
||||
$testObject.subObjectValue.stringarray = @("one","two")
|
||||
$result = $testObject | Format-Custom | Out-String
|
||||
$result | Should Match $expectResult1
|
||||
$result | Should Match $expectResult2
|
||||
$result | Should Match "one"
|
||||
$result | Should Match "two"
|
||||
}
|
||||
}
|
||||
@@ -32,27 +32,27 @@ Describe "Format-List" {
|
||||
|
||||
It "Should be able to call a property of the piped input" {
|
||||
# Tested on two input commands to verify functionality.
|
||||
{ Get-Command | Format-List -Property Name } | Should Not BeNullOrEmpty
|
||||
{ Get-Command | Select-Object -First 5 | Format-List -Property Name } | Should Not BeNullOrEmpty
|
||||
|
||||
{ Get-Date | Format-List -Property DisplayName } | Should Not BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Should be able to display a list of props when separated by a comma" {
|
||||
|
||||
(Get-Command | Format-List -Property Name,Source | Out-String) -Split "${nl}" |
|
||||
(Get-Command | Select-Object -First 5 | Format-List -Property Name,Source | Out-String) -Split "${nl}" |
|
||||
Where-Object { $_.trim() -ne "" } |
|
||||
ForEach-Object { $_ | Should Match "(Name)|(Source)" }
|
||||
}
|
||||
|
||||
It "Should show the requested prop in every element" {
|
||||
# Testing each element of format-list, using a for-each loop since the Format-List is so opaque
|
||||
(Get-Command | Format-List -Property Source | Out-String) -Split "${nl}" |
|
||||
(Get-Command | Select-Object -First 5 | Format-List -Property Source | Out-String) -Split "${nl}" |
|
||||
Where-Object { $_.trim() -ne "" } |
|
||||
ForEach-Object { $_ | Should Match "Source :" }
|
||||
}
|
||||
|
||||
It "Should not show anything other than the requested props" {
|
||||
$output = Get-Command | Format-List -Property Name | Out-String
|
||||
$output = Get-Command | Select-Object -First 5 | Format-List -Property Name | Out-String
|
||||
|
||||
$output | Should Not Match "CommandType :"
|
||||
$output | Should Not Match "Source :"
|
||||
@@ -66,3 +66,62 @@ Describe "Format-List" {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Format-List DRT basic functionality" -Tags DRT{
|
||||
It "Format-List with array should work"{
|
||||
$al = (0..255)
|
||||
$info = @{}
|
||||
$info.array = $al
|
||||
$result = $info | Format-List | Out-String
|
||||
$result | Should Match "Name : array\s+Value : {0, 1, 2, 3...}"
|
||||
}
|
||||
|
||||
It "Format-List with No Objects for End-To-End should work"{
|
||||
$p = @{}
|
||||
$result = $p | Format-List -Force -Property "foo","bar" | Out-String
|
||||
$result.Trim() | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Format-List with Null Objects for End-To-End should work"{
|
||||
$p = $null
|
||||
$result = $p | Format-List -Force -Property "foo","bar" | Out-String
|
||||
$result.Trim() | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Format-List with single line string for End-To-End should work"{
|
||||
$p = "single line string"
|
||||
$result = $p | Format-List -Force -Property "foo","bar" | Out-String
|
||||
$result.Trim() | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Format-List with multiple line string for End-To-End should work"{
|
||||
$p = "Line1\nLine2"
|
||||
$result = $p | Format-List -Force -Property "foo","bar" | Out-String
|
||||
$result.Trim() | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Format-List with string sequence for End-To-End should work"{
|
||||
$p = "Line1","Line2"
|
||||
$result = $p | Format-List -Force -Property "foo","bar" | Out-String
|
||||
$result.Trim() | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Format-List with complex object for End-To-End should work"{
|
||||
Add-Type -TypeDefinition "public enum MyDayOfWeek{Sun,Mon,Tue,Wed,Thr,Fri,Sat}"
|
||||
$eto = New-Object MyDayOfWeek
|
||||
$info = @{}
|
||||
$info.intArray = 1,2,3,4
|
||||
$info.arrayList = "string1","string2"
|
||||
$info.enumerable = [MyDayOfWeek]$eto
|
||||
$info.enumerableTestObject = $eto
|
||||
$result = $info|Format-List|Out-String
|
||||
$result | Should Match "Name : enumerableTestObject"
|
||||
$result | Should Match "Value : Sun"
|
||||
$result | Should Match "Name : arrayList"
|
||||
$result | Should Match "Value : {string1, string2}"
|
||||
$result | Should Match "Name : enumerable"
|
||||
$result | Should Match "Value : Sun"
|
||||
$result | Should Match "Name : intArray"
|
||||
$result | Should Match "Value : {1, 2, 3, 4}"
|
||||
}
|
||||
}
|
||||
@@ -8,26 +8,90 @@ Describe "Format-Wide" {
|
||||
}
|
||||
|
||||
It "Should be able to specify the columns in output using the column switch" {
|
||||
{ ls | Format-Wide -Column 3 } | Should Not Throw
|
||||
{ Get-ChildItem | Format-Wide -Column 3 } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to use the autosize switch" {
|
||||
{ ls | Format-Wide -Autosize } | Should Not Throw
|
||||
{ Get-ChildItem | Format-Wide -Autosize } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to take inputobject instead of pipe" {
|
||||
{ Format-Wide -InputObject $(ls) } | Should Not Throw
|
||||
{ Format-Wide -InputObject $(Get-ChildItem) } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to use the property switch" {
|
||||
{ Format-Wide -InputObject $(ls) -Property Mode } | Should Not Throw
|
||||
{ Format-Wide -InputObject $(Get-ChildItem) -Property Mode } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should throw an error when property switch and view switch are used together" {
|
||||
{ Format-Wide -InputObject $(ls) -Property CreationTime -View aoeu } | Should Throw "Found invalid data"
|
||||
try
|
||||
{
|
||||
Format-Wide -InputObject $(Get-ChildItem) -Property CreationTime -View aoeu
|
||||
}
|
||||
catch
|
||||
{
|
||||
$_.FullyQualifiedErrorId | Should be "FormatCannotSpecifyViewAndProperty,Microsoft.PowerShell.Commands.FormatWideCommand"
|
||||
}
|
||||
}
|
||||
|
||||
It "Should throw and suggest proper input when view is used with invalid input without the property switch" {
|
||||
{ Format-Wide -InputObject $(gps) -View aoeu } | Should Throw
|
||||
{ Format-Wide -InputObject $(Get-Process) -View aoeu } | Should Throw
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Format-Wide DRT basic functionality" -Tags DRT{
|
||||
It "Format-Wide with array should work"{
|
||||
$al = (0..255)
|
||||
$info = @{}
|
||||
$info.array = $al
|
||||
$result = $info | Format-Wide | Out-String
|
||||
$result | Should Match "array"
|
||||
}
|
||||
|
||||
It "Format-Wide with No Objects for End-To-End should work"{
|
||||
$p = @{}
|
||||
$result = $p | Format-Wide | Out-String
|
||||
$result | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Format-Wide with Null Objects for End-To-End should work"{
|
||||
$p = $null
|
||||
$result = $p | Format-Wide | Out-String
|
||||
$result | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Format-Wide with single line string for End-To-End should work"{
|
||||
$p = "single line string"
|
||||
$result = $p | Format-Wide | Out-String
|
||||
$result | Should Match $p
|
||||
}
|
||||
|
||||
It "Format-Wide with multiple line string for End-To-End should work"{
|
||||
$p = "Line1\nLine2"
|
||||
$result = $p | Format-Wide | Out-String
|
||||
$result | Should Match "Line1"
|
||||
$result | Should Match "Line2"
|
||||
}
|
||||
|
||||
It "Format-Wide with string sequence for End-To-End should work"{
|
||||
$p = "Line1","Line2"
|
||||
$result = $p |Format-Wide | Out-String
|
||||
$result | Should Match "Line1"
|
||||
$result | Should Match "Line2"
|
||||
}
|
||||
|
||||
It "Format-Wide with complex object for End-To-End should work"{
|
||||
Add-Type -TypeDefinition "public enum MyDayOfWeek{Sun,Mon,Tue,Wed,Thr,Fri,Sat}"
|
||||
$eto = New-Object MyDayOfWeek
|
||||
$info = @{}
|
||||
$info.intArray = 1,2,3,4
|
||||
$info.arrayList = "string1","string2"
|
||||
$info.enumerable = [MyDayOfWeek]$eto
|
||||
$info.enumerableTestObject = $eto
|
||||
$result = $info|Format-Wide|Out-String
|
||||
$result | Should Match "intArray"
|
||||
$result | Should Match "arrayList"
|
||||
$result | Should Match "enumerable"
|
||||
$result | Should Match "enumerableTestObject"
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,94 @@
|
||||
Describe "Get-Random DRT Unit Tests" -Tags DRT{
|
||||
$testData = @(
|
||||
@{ Name = 'no params'; Maximum = $null; Minimum = $null; GreaterThan = -1; LessThan = ([int32]::MaxValue); Type = 'System.Int32' }
|
||||
@{ Name = 'only positive maximum number'; Maximum = 100; Minimum = $null; GreaterThan = -1; LessThan = 100; Type = 'System.Int32' }
|
||||
@{ Name = 'maximum set to 0, Minimum to a negative number'; Maximum = 0; Minimum = -100; GreaterThan = -101; LessThan = 0; Type = 'System.Int32' }
|
||||
@{ Name = 'positive maximum, negative Minimum'; Maximum = 100; Minimum = -100; GreaterThan = -101; LessThan = 100; Type = 'System.Int32' }
|
||||
@{ Name = 'both negative'; Maximum = -100; Minimum = -200; GreaterThan = -201; LessThan = -100; Type = 'System.Int32' }
|
||||
@{ Name = 'both negative with parentheses'; Maximum = (-100); Minimum = (-200); GreaterThan = -201; LessThan = -100; Type = 'System.Int32' }
|
||||
@{ Name = 'maximum enclosed in quote'; Maximum = '8'; Minimum = 5; GreaterThan = 4; LessThan = 8; Type = 'System.Int32' }
|
||||
@{ Name = 'minimum enclosed in quote'; Maximum = 8; Minimum = '5'; GreaterThan = 4; LessThan = 8; Type = 'System.Int32' }
|
||||
@{ Name = 'maximum with plus sign'; Maximum = +100; Minimum = 0; GreaterThan = -1; LessThan = 100; Type = 'System.Int32' }
|
||||
@{ Name = 'maximum with plus sign and quote'; Maximum = '+100'; Minimum = 0; GreaterThan = -1; LessThan = 100; Type = 'System.Int32' }
|
||||
@{ Name = 'both with quote'; Maximum = '+100'; Minimum = '-100'; GreaterThan = -101; LessThan = 100; Type = 'System.Int32' }
|
||||
@{ Name = 'maximum set to kb'; Maximum = '1kb'; Minimum = 0; GreaterThan = -1; LessThan = 1024; Type = 'System.Int32' }
|
||||
@{ Name = 'maximum is Int64.MaxValue'; Maximum = ([int64]::MaxValue); Minimum = $null; GreaterThan = ([int64]-1); LessThan = ([int64]::MaxValue); Type = 'System.Int64' }
|
||||
@{ Name = 'maximum is a 64-bit integer'; Maximum = ([int64]100); Minimum = $null; GreaterThan = ([int64]-1); LessThan = ([int64]100); Type = 'System.Int64' }
|
||||
@{ Name = 'maximum set to a large integer greater than int32.MaxValue'; Maximum = 100000000000; Minimum = $null; GreaterThan = ([int64]-1); LessThan = ([int64]100000000000); Type = 'System.Int64' }
|
||||
@{ Name = 'maximum set to 0, Minumum set to a negative 64-bit integer'; Maximum = ([int64]0); Minimum = ([int64]-100); GreaterThan = ([int64]-101); LessThan = ([int64]0); Type = 'System.Int64' }
|
||||
@{ Name = 'maximum set to positive 64-bit number, min set to negative 64-bit number'; Maximum = ([int64]100); Minimum = ([int64]-100); GreaterThan = ([int64]-101); LessThan = ([int64]100); Type = 'System.Int64' }
|
||||
@{ Name = 'both are negative 64-bit number'; Maximum = ([int64]-100); Minimum = ([int64]-200); GreaterThan = ([int64]-201); LessThan = ([int64]-100); Type = 'System.Int64' }
|
||||
@{ Name = 'both are negative 64-bit number with parentheses'; Maximum = ([int64](-100)); Minimum = ([int64](-200)); GreaterThan = ([int64]-201); LessThan = ([int64]-100); Type = 'System.Int64' }
|
||||
@{ Name = 'max is 32-bit, min is 64-bit integer'; Maximum = '8'; Minimum = ([int64]5); GreaterThan = ([int64]4); LessThan = ([int64]8); Type = 'System.Int64' }
|
||||
@{ Name = 'max is 64-bit, min is 32-bit integer'; Maximum = ([int64]8); Minimum = '5'; GreaterThan = ([int64]4); LessThan = ([int64]8); Type = 'System.Int64' }
|
||||
@{ Name = 'max set to a 32-bit integer, min set to [int64]0'; Maximum = +100; Minimum = ([int64]0); GreaterThan = ([int64]-1); LessThan = ([int64]100); Type = 'System.Int64' }
|
||||
@{ Name = 'max set to a 32-bit integer with quote'; Maximum = '+100'; Minimum = ([int64]0); GreaterThan = ([int64]-1); LessThan = ([int64]100); Type = 'System.Int64' }
|
||||
@{ Name = 'max is [int64]0, min is a 32-bit integer'; Maximum = ([int64]0); Minimum = '-100'; GreaterThan = ([int64]-101); LessThan = ([int64]0); Type = 'System.Int64' }
|
||||
@{ Name = 'min set to 1MB, max set to a 64-bit integer greater than min'; Maximum = ([int64]1048585); Minimum = '1mb'; GreaterThan = ([int64]1048575); LessThan = ([int64]1048585); Type = 'System.Int64' }
|
||||
@{ Name = 'max set to 1tb, min set to 10 mb'; Maximum = '1tb'; Minimum = '10mb'; GreaterThan = ([int64]10485759); LessThan = ([int64]1099511627776); Type = 'System.Int64' }
|
||||
@{ Name = 'max is int64.MaxValue, min is Int64.MinValue'; Maximum = ([int64]::MaxValue); Minimum = ([int64]::MinValue); GreaterThan = ([int64]::MinValue); LessThan = ([int64]::MaxValue); Type = 'System.Int64' }
|
||||
@{ Name = 'both are int64.MaxValue plus a 32-bit integer'; Maximum = ([int64](([int]::MaxValue)+15)); Minimum = ([int64](([int]::MaxValue)+10)); GreaterThan = ([int64](([int]::MaxValue)+9)); LessThan = ([int64](([int]::MaxValue)+15)); Type = 'System.Int64' }
|
||||
@{ Name = 'both are greater than int32.MaxValue without specified type, and max with quote'; Maximum = '100099000001'; Minimum = 100000000001; GreaterThan = ([int64]10000000000); LessThan = ([int64]100099000001); Type = 'System.Int64' }
|
||||
@{ Name = 'both are greater than int32.MaxValue without specified type, and min with quote'; Maximum = 100000002230; Minimum = '100000002222'; GreaterThan = ([int64]100000002221); LessThan = ([int64]100000002230); Type = 'System.Int64' }
|
||||
@{ Name = 'max is greater than int32.MaxValue without specified type'; Maximum = 90000000000; Minimum = 4; GreaterThan = ([int64]3); LessThan = ([int64]90000000000); Type = 'System.Int64' }
|
||||
@{ Name = 'max is a double-precision number'; Maximum = 100.0; Minimum = $null; GreaterThan = -1.0; LessThan = 100.0; Type = 'System.Double' }
|
||||
@{ Name = 'both are double-precision numbers, min is negative.'; Maximum = 0.0; Minimum = -100.0; GreaterThan = -101.0; LessThan = 0.0; Type = 'System.Double' }
|
||||
@{ Name = 'both are double-precision number, max is positive, min is negative.'; Maximum = 100.0; Minimum = -100.0; GreaterThan = -101.0; LessThan = 100.0; Type = 'System.Double' }
|
||||
@{ Name = 'max is a double-precision number, min is int32'; Maximum = 8.0; Minimum = 5; GreaterThan = 4.0; LessThan = 8.0; Type = 'System.Double' }
|
||||
@{ Name = 'min is a double-precision number, max is int32'; Maximum = 8; Minimum = 5.0; GreaterThan = 4.0; LessThan = 8.0; Type = 'System.Double' }
|
||||
@{ Name = 'max set to a special double number'; Maximum = 20.; Minimum = 0.0; GreaterThan = -1.0; LessThan = 20.0; Type = 'System.Double' }
|
||||
@{ Name = 'max is double with quote'; Maximum = '20.'; Minimum = 0.0; GreaterThan = -1.0; LessThan = 20.0; Type = 'System.Double' }
|
||||
@{ Name = 'max is double with plus sign'; Maximum = +100.0; Minimum = 0; GreaterThan = -1.0; LessThan = 100.0; Type = 'System.Double' }
|
||||
@{ Name = 'max is doulbe with plus sign and enclosed in quote'; Maximum = '+100.0'; Minimum = 0; GreaterThan = -1.0; LessThan = 100.0; Type = 'System.Double' }
|
||||
@{ Name = 'both set to the special numbers as 1.0e+xx '; Maximum = $null; Minimum = 1.0e+100; GreaterThan = 1.0e+99; LessThan = ([double]::MaxValue); Type = 'System.Double' }
|
||||
@{ Name = 'max is Double.MaxValue, min is Double.MinValue'; Maximum = ([double]::MaxValue); Minimum = ([double]::MinValue); GreaterThan = ([double]::MinValue); LessThan = ([double]::MaxValue); Type = 'System.Double' }
|
||||
|
||||
)
|
||||
|
||||
$testDataForError = @(
|
||||
@{ Name = 'Min is greater than max and all are positive 32-bit integer'; Maximum = 10; Minimum = 20}
|
||||
@{ Name = 'Min and Max are same and all are positive 32-bit integer'; Maximum = 20; Minimum = 20}
|
||||
@{ Name = 'Min is greater than max and all are negative 32-bit integer'; Maximum = -20; Minimum = -10}
|
||||
@{ Name = 'Min and Max are same and all are negative 32-bit integer'; Maximum = -20; Minimum = -20}
|
||||
@{ Name = 'Min is greater than max and all are positive double-precision number'; Maximum = 10.0; Minimum = 20.0}
|
||||
@{ Name = 'Min and Max are same and all are positive double-precision number'; Maximum = 20.0; Minimum = 20.0}
|
||||
@{ Name = 'Min is greater than max and all are negative double-precision number'; Maximum = -20.0; Minimum = -10.0}
|
||||
@{ Name = 'Min and Max are same and all are negative double-precision number'; Maximum = -20.0; Minimum = -20.0}
|
||||
@{ Name = 'Max is a negative number, min is the default number '; Maximum = -10; Minimum = $null}
|
||||
|
||||
)
|
||||
|
||||
# minimum is always set to the actual low end of the range, details refer to closed issue #887.
|
||||
It "get a correct random number for '<Name>'" -TestCases $testData {
|
||||
param($maximum, $minimum, $greaterThan, $lessThan, $type)
|
||||
|
||||
$result = Get-Random -Maximum $maximum -Minimum $minimum
|
||||
$result | Should BeGreaterThan $greaterThan
|
||||
$result | Should BeLessThan $lessThan
|
||||
$result.GetType().FullName | Should Be $type
|
||||
|
||||
}
|
||||
|
||||
It "Should be able to throw error when '<Name>'" -TestCases $testDataForError {
|
||||
param($maximum, $minimum)
|
||||
try
|
||||
{
|
||||
Get-Random -Minimum $minimum -Maximum $maximum
|
||||
throw "OK"
|
||||
}
|
||||
catch
|
||||
{
|
||||
$_.FullyQualifiedErrorId | Should Be "MinGreaterThanOrEqualMax,Microsoft.PowerShell.Commands.GetRandomCommand"
|
||||
}
|
||||
}
|
||||
|
||||
It "Tests for setting the seed" {
|
||||
$result1 = (get-random -SetSeed 123), (get-random)
|
||||
$result2 = (get-random -SetSeed 123), (get-random)
|
||||
$result1 | Should Be $result2
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Get-Random" {
|
||||
It "Should return a random number greater than -1 " {
|
||||
Get-Random | Should BeGreaterThan -1
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
Describe "Get-Unique DRT Unit Tests" -Tags DRT{
|
||||
It "Command get-unique works with AsString switch" {
|
||||
$inputArray = "aa","aa","Aa","ba","BA","BA"
|
||||
$results = $inputArray | Get-Unique -AsString
|
||||
|
||||
$results.Length | Should Be 4
|
||||
|
||||
$results[0] | Should Be "aa"
|
||||
$results[1] | Should Be "Aa"
|
||||
$results[2] | Should Be "ba"
|
||||
$results[3] | Should Be "BA"
|
||||
|
||||
$results[0].GetType().FullName | Should be System.String
|
||||
$results[1].GetType().FullName | Should be System.String
|
||||
$results[2].GetType().FullName | Should be System.String
|
||||
$results[3].GetType().FullName | Should be System.String
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Get-Unique" {
|
||||
$sortedList1 = 1,2,2,3,3,4,5
|
||||
It "Should be able to use the Get-Unique cmdlet without error with inputObject switch" {
|
||||
@@ -59,12 +78,12 @@ Describe "Get-Unique" {
|
||||
$collection = "a", "b", "b", "d"
|
||||
$expectedOutput = "a", "b", "d"
|
||||
|
||||
$actual = Get-Unique -InputObject $collection
|
||||
$actual = $collection | Get-Unique
|
||||
|
||||
$actual.Length | Should Be $collection.Length
|
||||
$actual.Length | Should Be $expectedOutput.Length
|
||||
|
||||
$actual[0] | Should Be $collection[0]
|
||||
$actual[1] | Should Be $collection[1]
|
||||
$actual[2] | Should Be $collection[2]
|
||||
$actual[0] | Should Be $expectedOutput[0]
|
||||
$actual[1] | Should Be $expectedOutput[1]
|
||||
$actual[2] | Should Be $expectedOutput[2]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user