Skip to content

Commit 8279fa3

Browse files
committed
fid: Update test cases in InvokeHelperTest_JobInternal_Start_WhatIf to use return values
1 parent 789962f commit 8279fa3

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

InvokeHelperTest/public/Start-MyJob.test.ps1

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,17 @@ function InvokeHelperTest_JobInternal_Start{
1515

1616
function InvokeHelperTest_JobInternal_Start_WhatIf{
1717
$jobs = @()
18-
$jobs += Start-MyJob -Command "command to be called1" -WhatIf @InfoParameters
19-
Assert-Contains -Expected "command to be called1" -Presented $infoVar
18+
$jobs += Start-MyJob -Command "return 1" -WhatIf @InfoParameters
19+
Assert-Contains -Expected "return 1" -Presented $infoVar
2020

21-
$jobs += Start-MyJob -Command "command to be called2" -WhatIf @InfoParameters
22-
Assert-Contains -Expected "command to be called2" -Presented $infoVar
21+
$jobs += Start-MyJob -Command "return 2" -WhatIf @InfoParameters
22+
Assert-Contains -Expected "return 2" -Presented $infoVar
2323

2424
$waited = Wait-Job -Job $jobs
2525

2626
$result = Receive-Job -Job $waited
2727

28-
Assert-Count -Expected 2 -Presented $result
29-
Assert-IsNull -Object $result[0]
30-
Assert-IsNull -Object $result[1]
28+
Assert-isnull -Object $result
3129
}
3230

3331
function InvokeHelperTest_JobInternal_Start_MultiCall{

0 commit comments

Comments
 (0)