From 98aedca37316b091bbfa461c29199a5b43c46840 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 19 May 2019 16:24:39 -0500 Subject: [PATCH] Update Parameter Tests --- Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 | 9 +++++++++ Tests/Public/Invoke-ZertoMoveRollback.Tests.ps1 | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 b/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 index 50d2f9d..89cf63f 100644 --- a/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 +++ b/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 @@ -16,4 +16,13 @@ Describe $file.BaseName -Tag 'Unit' { $null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors) $errors | Should -HaveCount 0 } + + Context "$($file.BaseName)::Parameter Unit Tests" { + + it "has a mandatory string parameter for the vpgName" { + Get-Command $file.BaseName | Should -HaveParameter vpgName + Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[] + Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory + } + } } \ No newline at end of file diff --git a/Tests/Public/Invoke-ZertoMoveRollback.Tests.ps1 b/Tests/Public/Invoke-ZertoMoveRollback.Tests.ps1 index 50d2f9d..89cf63f 100644 --- a/Tests/Public/Invoke-ZertoMoveRollback.Tests.ps1 +++ b/Tests/Public/Invoke-ZertoMoveRollback.Tests.ps1 @@ -16,4 +16,13 @@ Describe $file.BaseName -Tag 'Unit' { $null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors) $errors | Should -HaveCount 0 } + + Context "$($file.BaseName)::Parameter Unit Tests" { + + it "has a mandatory string parameter for the vpgName" { + Get-Command $file.BaseName | Should -HaveParameter vpgName + Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[] + Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory + } + } } \ No newline at end of file