From 6a924067c9278aadfd86a0cac4c1e77d3faf06ac Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 21 Jul 2019 20:57:25 -0400 Subject: [PATCH] Add Parameter Tests --- Tests/Public/Get-ZAMonitoring.Tests.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tests/Public/Get-ZAMonitoring.Tests.ps1 b/Tests/Public/Get-ZAMonitoring.Tests.ps1 index e6e6083..69c36ca 100644 --- a/Tests/Public/Get-ZAMonitoring.Tests.ps1 +++ b/Tests/Public/Get-ZAMonitoring.Tests.ps1 @@ -5,7 +5,14 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { + it "$global:function should have exactly 12 parameters defined" { + (get-command $global:function).Parameters.Count | Should -Be 12 + } + it "$global:function has a non-mandatory string parameter for the zOrgIdentifier" { + Get-Command $global:function | Should -HaveParameter zOrgIdentifier -Type String + Get-Command $global:function | Should -HaveParameter zOrgIdentifier -not -Mandatory + } } Context "$global:function::Parameter Functional Tests" {