The orignal test took too long to run

This commit is contained in:
dfinke
2022-10-20 20:13:27 -04:00
parent e703a21dec
commit 970febd6d3

View File

@@ -34,17 +34,9 @@ Describe 'Test' -Tag ImportExcelEndRowAndCols {
}
It 'Should read any row up to maximum allowed row' {
# Max Rows sheet has row number as integer in column 1.
$xlMaxRows = "$PSScriptRoot\MaxRows.xlsx"
# Construct array of ten numbers. Min (1), 8 random numbers between Min and max, Max (1048576)
$countOfTen = @(1)
$countOfTen += (Get-Random -Count 8 -InputObject (2..1048575)) | Sort-Object
$countOfTen += 1048576
# Test these cell values.
$countOfTen | ForEach-Object {
$actual = Import-Excel $xlMaxRows -StartRow $_ -EndRow $_ -NoHeader
$actual.P1 | Should -Be $_
}
$actual = Import-Excel $xlMaxRows -StartRow 1048576 -EndRow 1048576 -NoHeader
$actual.P1 | Should -Be 1048576
}
}