tests/functions/utility/Connect-PSCucm.Tests.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
Import-Module $PSScriptRoot\..\..\..\PSCUCM.psd1 -Force Describe "Invoke-PSCUCMAxlQuery" { BeforeAll { $connectPSCucmSplat = @{ AXLVersion = 11.5 Server = '127.0.0.1' Credential = [System.Management.Automation.PSCredential]::new('user', (ConvertTo-SecureString 'pass' -AsPlainText -Force)) SkipCertificateCheck = $true } Connect-PSCucm @connectPSCucmSplat } It "Correctly set the server" { Get-PSFConfigValue -FullName 'pscucm.server' | Should -BeExactly $connectPSCucmSplat.server } It "Correctly set the AXLVersion" { Get-PSFConfigValue -FullName 'pscucm.axlversion' | Should -BeExactly $connectPSCucmSplat.AXLVersion } It "Correctly set the credential" { Get-PSFConfigValue -FullName 'pscucm.credential' | Should -BeExactly $connectPSCucmSplat.credential } It "Correctly set the connected status" { Get-PSFConfigValue -FullName 'pscucm.connected' | Should -BeTrue } It "Correctly set the certificate check" { Get-PSFConfigValue -FullName 'pscucm.skipcertificatecheck' | Should -BeTrue } AfterAll { Disconnect-PSCucm } } |