From 82458712f03eb992f68a9b7766f0d2fd33280961 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 10:46:40 -0400 Subject: [PATCH] Update tests for new functionality --- Tests/Public/Install-ZertoVra.Tests.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Tests/Public/Install-ZertoVra.Tests.ps1 b/Tests/Public/Install-ZertoVra.Tests.ps1 index f4c529d..7105db6 100644 --- a/Tests/Public/Install-ZertoVra.Tests.ps1 +++ b/Tests/Public/Install-ZertoVra.Tests.ps1 @@ -5,8 +5,8 @@ $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 22 parameters defined" { - (Get-Command $global:function).Parameters.Count | Should -Be 22 + It "$global:function should have exactly 24 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 24 } $ParameterTestCases = @( @@ -17,6 +17,8 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { @{ParameterName = 'vraIpAddress'; Type = 'String'; Mandatory = $true; Validation = 'IpAddr' } @{ParameterName = 'subnetMask'; Type = 'String'; Mandatory = $true; Validation = 'IpAddr' } @{ParameterName = 'defaultGateway'; Type = 'String'; Mandatory = $true; Validation = 'IpAddr' } + @{ParameterName = 'UseRootCredential'; Type = 'Switch'; Mandatory = $true; Validation = $null } + @{ParameterName = 'HostRootPassword'; Type = 'SecureString'; Mandatory = $true; Validation = 'NotNullOrEmpty' } ) It " parameter is of type" -TestCases $ParameterTestCases { @@ -40,7 +42,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { $null { $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes - $attrs.TypeId.Count | Should -Be 2 + $attrs.TypeId.Count | Should -Be 3 } } }