Skip to content

Commit

Permalink
Add pester tests for checking Layout parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
krymtkts committed Nov 11, 2023
1 parent 4ea6606 commit 1c59038
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/pocof.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ Describe 'pocof' {
$_ | Should @p
}
}

Context 'Checking Select-Pocof parameters' -ForEach @{
InputObject = 'Hello,world'
Expected = 'Hello,world'
BaseParam = @{NonInteractive = $true };
} {
Context 'In <Layout> mode with empty query' -ForEach @(
@{ Layout = 'TopDown' },
@{ Layout = 'BottomUp' }
) {
It "Given Layout '<Layout>', '<Expected>' should be returned." -TestCases @(
@{Params = $BaseParam + $_ }
) {
$InputObject | Select-Pocof @Params -ErrorAction SilentlyContinue | Should -BeExactly -ExpectedValue $Expected
}
}
}

Context 'Select-Pocof cmdlet' -ForEach @{
InputObject = 'Hello,world'; BaseParam = @{NonInteractive = $true };
} {
Expand Down

0 comments on commit 1c59038

Please sign in to comment.