Create Get-ZertoApiFilter.Tests.ps1

This commit is contained in:
Wes Carroll
2019-02-24 20:50:22 -05:00
parent b8d95590c4
commit 03060663d1
@@ -0,0 +1,23 @@
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.'
$modulePath = $filePath -replace "Private", ""
. "$filePath\$fileName"
$oneItemTest = @{"OneItem" = "Test"}
$twoItemTest = @{"OneItem" = "Test"; "SecondItem" = "Yours"}
$boolItemTest = @{"OneItem" = "Test"; "BoolItem" = $true}
Describe "Get-ZertoApiFilter" {
it "file should exist" {
"$filePath\$fileName" | should exist
}
it "one item test" {
Get-ZertoApiFilter -filtertable $oneItemTest | should be "?OneItem=Test"
}
it "twoItemTest" {
Get-ZertoApiFilter -filtertable $twoItemTest | should be "?OneItem=Test&SecondItem=Yours"
}
it "bool item test" {
Get-ZertoApiFilter -filtertable $boolItemTest | should be "?OneItem=Test&BoolItem=True"
}
}